From 18156ac03fc8f8ab723066c7ec390447b6898cb1 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 22 Jan 2008 20:06:01 +0000 Subject: [PATCH] dilate the brush mask in order to obtain a simpler boundary. Addresses bug 2008-01-22 Sven Neumann * app/paint/gimpbrushcore.c (gimp_brush_core_create_bound_segs): dilate the brush mask in order to obtain a simpler boundary. Addresses bug #304798. * app/tools/gimpbrushtool.c (gimp_brush_tool_draw_brush): removed redundant casts. svn path=/trunk/; revision=24676 --- ChangeLog | 9 +++++++++ app/paint/gimpbrushcore.c | 5 +++++ app/tools/gimpbrushtool.c | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7798d249cf..7802cd00ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-22 Sven Neumann + + * app/paint/gimpbrushcore.c (gimp_brush_core_create_bound_segs): + dilate the brush mask in order to obtain a simpler boundary. + Addresses bug #304798. + + * app/tools/gimpbrushtool.c (gimp_brush_tool_draw_brush): removed + redundant casts. + 2008-01-22 Sven Neumann * app/base/boundary.c: minor cleanups. diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c index ae32427a49..ea6ff15c17 100644 --- a/app/paint/gimpbrushcore.c +++ b/app/paint/gimpbrushcore.c @@ -30,6 +30,8 @@ #include "base/pixel-region.h" #include "base/temp-buf.h" +#include "paint-funcs/paint-funcs.h" + #include "core/gimpbrush.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" @@ -784,6 +786,9 @@ gimp_brush_core_create_bound_segs (GimpBrushCore *core, pixel_region_init_temp_buf (&PR, mask, 0, 0, mask->width, mask->height); + /* dilate the mask in order to obtain a simpler boundary */ + dilate_region (&PR); + boundary = boundary_find (&PR, BOUNDARY_WITHIN_BOUNDS, 0, 0, PR.w, PR.h, 0, diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c index 950528b171..8c5324812b 100644 --- a/app/tools/gimpbrushtool.c +++ b/app/tools/gimpbrushtool.c @@ -295,8 +295,8 @@ gimp_brush_tool_draw_brush (GimpBrushTool *brush_tool, if (brush_core->brush_bound_segs) { GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (draw_tool->display->shell); - gdouble width = (gdouble) brush_core->brush_bound_width; - gdouble height = (gdouble) brush_core->brush_bound_height; + gdouble width = brush_core->brush_bound_width; + gdouble height = brush_core->brush_bound_height; /* don't draw the boundary if it becomes too small */ if (SCALEX (shell, width) > 4 && SCALEY (shell, height) > 4)