dilate the brush mask in order to obtain a simpler boundary. Addresses bug

2008-01-22  Sven Neumann  <sven@gimp.org>

	* 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
This commit is contained in:
Sven Neumann 2008-01-22 20:06:01 +00:00 committed by Sven Neumann
parent 61b147391a
commit 18156ac03f
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2008-01-22 Sven Neumann <sven@gimp.org>
* 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 <sven@gimp.org>
* app/base/boundary.c: minor cleanups.

View File

@ -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,

View File

@ -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)