diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 03:06:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 03:06:17 +0400 |
commit | 77f47799ddff99da672aa58e5d989237403e7707 (patch) | |
tree | 951fa8eb0d6853355b697cc262ed92ddd9dd7a83 /source/blender/editors/mask | |
parent | 94ce9505a9bf07e3d2532c82a0b8396f7c9727b3 (diff) |
code cleanup: use BLI_RCT_SIZE macro
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 703ae70eb0f..9c2e70a836e 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -33,6 +33,7 @@ #include "BLI_utildefines.h" #include "BLI_math.h" +#include "BLI_rect.h" #include "BKE_context.h" #include "BKE_mask.h" @@ -512,12 +513,12 @@ void ED_mask_draw_region(Mask *mask, ARegion *ar, UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y); - /* w = v2d->tot.xmax - v2d->tot.xmin; */ - /* h = v2d->tot.ymax - v2d->tot.ymin;/*/ + /* w = BLI_RCT_SIZE_X(&v2d->tot); */ + /* h = BLI_RCT_SIZE_Y(&v2d->tot);/*/ - zoomx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1) / (float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)); - zoomy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1) / (float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)); + zoomx = (float)(BLI_RCT_SIZE_X(&ar->winrct) + 1) / (float)(BLI_RCT_SIZE_X(&ar->v2d.cur)); + zoomy = (float)(BLI_RCT_SIZE_Y(&ar->winrct) + 1) / (float)(BLI_RCT_SIZE_Y(&ar->v2d.cur)); if (do_scale_applied) { zoomx /= width; |