Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 13:20:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 13:20:35 +0400
commit869382403a7e9744d650f9b8ea9b7f5d5e931e6e (patch)
treedf2c98572a35c79c7fccbc628aeb13290767c8cf /source
parent29dd72ea8496a4f0ece16e691c310c086b65bd25 (diff)
mask: skip self intersection on drawing when fill is disabled, since it was only drawing on one side of an unfilled spline.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenfont/intern/blf_font.c8
-rw-r--r--source/blender/blenkernel/BKE_mask.h3
-rw-r--r--source/blender/blenkernel/intern/mask.c6
-rw-r--r--source/blender/editors/mask/mask_draw.c2
4 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 751c2f5043b..509a092fabd 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -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);
}
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index a56f99c011c..b46aefe4e98 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -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];
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index d951f430dc2..1e1cbf8610e 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -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]
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index 9c2e70a836e..c6b19e51de9 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -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);