diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-13 06:28:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-13 06:28:48 +0400 |
commit | c5310521f8d9099fc36431bae76dd0a402cc077e (patch) | |
tree | d60e9f1807d8790355109fdf7975db4df45c7383 /source/blender/editors/mask | |
parent | ab48f2108bc8ff1dfcc34e2f395debac97be7826 (diff) |
fix for drawing non 1:1 aspect masks, transform and selection still need support.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 00bbfcf3188..655458bd4cb 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -496,7 +496,8 @@ void ED_mask_draw(const bContext *C, * width, height are to match the values from ED_mask_get_size() */ void ED_mask_draw_region(Mask *mask, ARegion *ar, const char draw_flag, const char draw_type, - int width, int height, + const int width_i, const int height_i, /* convert directly into aspect corrected vars */ + const float aspx, const float aspy, const short do_scale_applied, const short do_post_draw, float stabmat[4][4], /* optional - only used by clip */ const bContext *C /* optional - only used when do_post_draw is set */ @@ -504,6 +505,9 @@ void ED_mask_draw_region(Mask *mask, ARegion *ar, { struct View2D *v2d = &ar->v2d; + /* aspect always scales vertically in movie and image spaces */ + const float width = width_i, height = (float)height_i * (aspy / aspx); + int x, y; /* int w, h; */ float zoomx, zoomy; |