diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-27 00:22:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-27 00:22:42 +0400 |
commit | c68890cb870477091db35ce2092121dc24548c1e (patch) | |
tree | 638cef99ba3093513fe8f25d59f29577e4688813 /source/blender/editors/mask | |
parent | fa5b0e1d0fc0b89ab3127becd59697ec6cfa5ecb (diff) |
ensure there are always the same number of feather points and non feather points when drawing.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index c6b19e51de9..00bbfcf3188 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -365,6 +365,9 @@ static void draw_spline_curve(MaskLayer *masklay, MaskSpline *spline, const short is_active, int width, int height) { + const unsigned int resol = maxi(BKE_mask_spline_feather_resolution(spline, width, height), + BKE_mask_spline_resolution(spline, width, height)); + unsigned char rgb_tmp[4]; const short is_spline_sel = (spline->flag & SELECT) && (masklay->restrictflag & MASK_RESTRICT_SELECT) == 0; @@ -377,7 +380,7 @@ static void draw_spline_curve(MaskLayer *masklay, MaskSpline *spline, int tot_feather_point; float (*feather_points)[2]; - diff_points = BKE_mask_spline_differentiate_with_resolution(spline, width, height, &tot_diff_point); + diff_points = BKE_mask_spline_differentiate_with_resolution_ex(spline, &tot_diff_point, resol); if (!diff_points) return; @@ -388,7 +391,7 @@ static void draw_spline_curve(MaskLayer *masklay, MaskSpline *spline, glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } - feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution(spline, width, height, &tot_feather_point, (is_fill != FALSE)); + feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution_ex(spline, &tot_feather_point, resol, (is_fill != FALSE)); /* draw feather */ mask_spline_feather_color_get(masklay, spline, is_spline_sel, rgb_tmp); |