mask: skip self intersection on drawing when fill is disabled, since it was only drawing on one side of an unfilled spline.

This commit is contained in:
Campbell Barton 2012-08-21 09:20:35 +00:00
parent 29dd72ea84
commit 869382403a
4 changed files with 10 additions and 9 deletions

View File

@ -229,9 +229,9 @@ void blf_font_buffer(FontBLF *font, const char *str)
FontBufInfoBLF *buf_info = &font->buf_info;
float b_col_float[4];
const unsigned char b_col_char[4] = {buf_info->col[0] * 255,
buf_info->col[1] * 255,
buf_info->col[2] * 255,
buf_info->col[3] * 255};
buf_info->col[1] * 255,
buf_info->col[2] * 255,
buf_info->col[3] * 255};
unsigned char *cbuf;
int chx, chy;
@ -242,7 +242,7 @@ void blf_font_buffer(FontBLF *font, const char *str)
blf_font_ensure_ascii_table(font);
/* another buffer spesific call for color conversion */
/* another buffer specific call for color conversion */
if (buf_info->do_color_management) {
srgb_to_linearrgb_v4(b_col_float, buf_info->col);
}

View File

@ -78,7 +78,8 @@ void BKE_mask_spline_feather_collapse_inner_loops(struct MaskSpline *spline,
float (*BKE_mask_spline_differentiate_with_resolution(struct MaskSpline *spline, int width, int height, int *tot_diff_point))[2];
float (*BKE_mask_spline_feather_differentiated_points_with_resolution_ex(struct MaskSpline *spline, int *tot_feather_point,
const unsigned int resol, const int do_feather_isect))[2];
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(struct MaskSpline *spline, int width, int height, int *tot_feather_point))[2];
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(struct MaskSpline *spline, int width, int height,
int *tot_feather_point, const int do_feather_isect))[2];
float (*BKE_mask_spline_feather_points(struct MaskSpline *spline, int *tot_feather_point))[2];

View File

@ -792,16 +792,16 @@ float (*BKE_mask_spline_feather_differentiated_points_with_resolution_ex(MaskSpl
}
float (*BKE_mask_spline_feather_differentiated_points_with_resolution(MaskSpline *spline, int width, int height,
int *tot_feather_point))[2]
int *tot_feather_point, const int do_feather_isect))[2]
{
unsigned int resol = BKE_mask_spline_feather_resolution(spline, width, height);
return BKE_mask_spline_feather_differentiated_points_with_resolution_ex(spline, tot_feather_point, resol, TRUE);
return BKE_mask_spline_feather_differentiated_points_with_resolution_ex(spline, tot_feather_point, resol, do_feather_isect);
}
float (*BKE_mask_spline_feather_differentiated_points(MaskSpline *spline, int *tot_feather_point))[2]
{
return BKE_mask_spline_feather_differentiated_points_with_resolution(spline, 0, 0, tot_feather_point);
return BKE_mask_spline_feather_differentiated_points_with_resolution(spline, 0, 0, tot_feather_point, TRUE);
}
float (*BKE_mask_spline_feather_points(MaskSpline *spline, int *tot_feather_point))[2]

View File

@ -388,7 +388,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);
feather_points = BKE_mask_spline_feather_differentiated_points_with_resolution(spline, width, height, &tot_feather_point, (is_fill != FALSE));
/* draw feather */
mask_spline_feather_color_get(masklay, spline, is_spline_sel, rgb_tmp);