Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/view2d.c
| Show First 20 Lines • Show All 1,889 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Calculate the scale per-axis of the drawing-area | * Calculate the scale per-axis of the drawing-area | ||||
| * | * | ||||
| * Is used to inverse correct drawing of icons, etc. that need to follow view | * Is used to inverse correct drawing of icons, etc. that need to follow view | ||||
| * but not be affected by scale | * but not be affected by scale | ||||
| * | * | ||||
| * \param r_x, r_y: scale on each axis | * \param r_x, r_y: scale on each axis | ||||
| */ | */ | ||||
| void UI_view2d_scale_get(View2D *v2d, float *r_x, float *r_y) | void UI_view2d_scale_get(const View2D *v2d, float *r_x, float *r_y) | ||||
| { | { | ||||
| if (r_x) { | if (r_x) { | ||||
| *r_x = UI_view2d_scale_get_x(v2d); | *r_x = UI_view2d_scale_get_x(v2d); | ||||
| } | } | ||||
| if (r_y) { | if (r_y) { | ||||
| *r_y = UI_view2d_scale_get_y(v2d); | *r_y = UI_view2d_scale_get_y(v2d); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines | |||||