minor cleanup.

2005-07-29  Sven Neumann  <sven@gimp.org>

	* app/base/siox.c (siox_foreground_extract): minor cleanup.
This commit is contained in:
Sven Neumann 2005-07-28 23:40:00 +00:00 committed by Sven Neumann
parent 0728f76b35
commit fde49937b3
2 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2005-07-29 Sven Neumann <sven@gimp.org>
* app/base/siox.c (siox_foreground_extract): minor cleanup.
2005-07-29 Sven Neumann <sven@gimp.org>
* app/core/gimpundostack.[ch]: added gimp_undo_stack_get_depth().

View File

@ -747,7 +747,7 @@ find_max_blob (TileManager *mask,
/* Returns squared clustersize */
static gfloat
getclustersize (const gfloat limits[SIOX_DIMS])
get_clustersize (const gfloat limits[SIOX_DIMS])
{
gfloat sum = (limits[0] - (-limits[0])) * (limits[0] - (-limits[0]));
@ -785,11 +785,12 @@ siox_foreground_extract (TileManager *pixels,
PixelRegion srcPR;
PixelRegion mapPR;
gpointer pr;
gboolean intersect;
gint x, y;
gint width, height;
gint bpp;
gint row, col;
gfloat clustersize = getclustersize (limits);
const gfloat clustersize = get_clustersize (limits);
gint surebgcount = 0;
gint surefgcount = 0;
gint i, j;
@ -804,19 +805,19 @@ siox_foreground_extract (TileManager *pixels,
cpercep_init ();
gimp_rectangle_intersect (offset_x, offset_y,
tile_manager_width (pixels),
tile_manager_height (pixels),
0, 0,
tile_manager_width (mask),
tile_manager_height (mask),
&x, &y, &width, &height);
intersect = gimp_rectangle_intersect (offset_x, offset_y,
tile_manager_width (pixels),
tile_manager_height (pixels),
0, 0,
tile_manager_width (mask),
tile_manager_height (mask),
&x, &y, &width, &height);
/* FIXME:
* Should clear the mask outside the rectangle that we are working on.
*/
if (! (width > 0 && height > 0))
if (! intersect)
return;
/* count given foreground and background pixels */