mirror of https://github.com/GNOME/gimp.git
app/core/gimpdrawable-foreground-extract.[ch]
2005-10-17 Sven Neumann <sven@gimp.org> * app/core/gimpdrawable-foreground-extract.[ch] * app/tools/gimpforegroundselectoptions.[ch] * app/tools/gimpforegroundselecttool.c: added "multiblob" property to GimpForegroundSelectOptions and pass it to gimp_drawable_foreground_extract_siox().
This commit is contained in:
parent
6912227651
commit
18a138fea7
|
@ -1,3 +1,11 @@
|
|||
2005-10-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpdrawable-foreground-extract.[ch]
|
||||
* app/tools/gimpforegroundselectoptions.[ch]
|
||||
* app/tools/gimpforegroundselecttool.c: added "multiblob"
|
||||
property to GimpForegroundSelectOptions and pass it to
|
||||
gimp_drawable_foreground_extract_siox().
|
||||
|
||||
2005-10-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/file/file-open.[ch]: added run-mode parameter to
|
||||
|
|
|
@ -45,7 +45,6 @@ gimp_drawable_foreground_extract (GimpDrawable *drawable,
|
|||
GimpDrawable *mask,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
const gint smoothness = SIOX_DEFAULT_SMOOTHNESS;
|
||||
const gdouble sensitivity[3] = { SIOX_DEFAULT_SENSITIVITY_L,
|
||||
SIOX_DEFAULT_SENSITIVITY_A,
|
||||
SIOX_DEFAULT_SENSITIVITY_B };
|
||||
|
@ -57,7 +56,9 @@ gimp_drawable_foreground_extract (GimpDrawable *drawable,
|
|||
0, 0,
|
||||
gimp_item_width (GIMP_ITEM (mask)),
|
||||
gimp_item_height (GIMP_ITEM (mask)),
|
||||
smoothness, sensitivity,
|
||||
FALSE,
|
||||
SIOX_DEFAULT_SMOOTHNESS,
|
||||
sensitivity,
|
||||
progress);
|
||||
}
|
||||
|
||||
|
@ -68,6 +69,7 @@ gimp_drawable_foreground_extract_siox (GimpDrawable *drawable,
|
|||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean multiblob,
|
||||
gint smoothness,
|
||||
const gdouble sensitivity[3],
|
||||
GimpProgress *progress)
|
||||
|
@ -117,7 +119,7 @@ gimp_drawable_foreground_extract_siox (GimpDrawable *drawable,
|
|||
(SioxProgressFunc) gimp_progress_set_value,
|
||||
progress);
|
||||
|
||||
siox_foreground_extract (state, smoothness, sensitivity, TRUE, 255);
|
||||
siox_foreground_extract (state, smoothness, sensitivity, multiblob, 255);
|
||||
siox_done (state);
|
||||
|
||||
if (progress)
|
||||
|
|
|
@ -32,6 +32,7 @@ void gimp_drawable_foreground_extract_siox (GimpDrawable *drawabl
|
|||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gboolean multiblob,
|
||||
gint smoothness,
|
||||
const gdouble sensitivity[3],
|
||||
GimpProgress *progress);
|
||||
|
|
|
@ -40,6 +40,7 @@ enum
|
|||
PROP_0,
|
||||
PROP_EXPANDED,
|
||||
PROP_BACKGROUND,
|
||||
PROP_MULTIBLOB,
|
||||
PROP_STROKE_WIDTH,
|
||||
PROP_SMOOTHNESS,
|
||||
PROP_SENSITIVITY_L,
|
||||
|
@ -104,6 +105,11 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla
|
|||
"background", NULL,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_MULTIBLOB,
|
||||
"multiblob",
|
||||
_("Select multiple disconnected objects"),
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_STROKE_WIDTH,
|
||||
"stroke-width",
|
||||
_("Size of the brush used for refinements"),
|
||||
|
@ -149,6 +155,9 @@ gimp_foreground_select_options_set_property (GObject *object,
|
|||
case PROP_BACKGROUND:
|
||||
options->background = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_MULTIBLOB:
|
||||
options->multiblob = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_STROKE_WIDTH:
|
||||
options->stroke_width = g_value_get_int (value);
|
||||
break;
|
||||
|
@ -186,6 +195,9 @@ gimp_foreground_select_options_get_property (GObject *object,
|
|||
case PROP_BACKGROUND:
|
||||
g_value_set_boolean (value, options->background);
|
||||
break;
|
||||
case PROP_MULTIBLOB:
|
||||
g_value_set_boolean (value, options->multiblob);
|
||||
break;
|
||||
case PROP_STROKE_WIDTH:
|
||||
g_value_set_int (value, options->stroke_width);
|
||||
break;
|
||||
|
|
|
@ -40,6 +40,7 @@ struct _GimpForegroundSelectOptions
|
|||
|
||||
gboolean expanded;
|
||||
gboolean background;
|
||||
gboolean multiblob;
|
||||
gint stroke_width;
|
||||
gint smoothness;
|
||||
gdouble sensitivity[3];
|
||||
|
|
|
@ -651,6 +651,7 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
|
|||
gimp_drawable_foreground_extract_siox (drawable,
|
||||
GIMP_DRAWABLE (mask),
|
||||
x1, y1, x2 - x1, y2 - y1,
|
||||
options->multiblob,
|
||||
options->smoothness,
|
||||
options->sensitivity,
|
||||
GIMP_PROGRESS (gdisp));
|
||||
|
@ -823,6 +824,7 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
|
|||
|
||||
if (pspec->name &&
|
||||
(strcmp (pspec->name, "smoothness") == 0 ||
|
||||
strcmp (pspec->name, "multiblob") == 0 ||
|
||||
strncmp (pspec->name, "sensitivity", strlen ("sensitivity")) == 0))
|
||||
{
|
||||
if (fg_select->idle_id)
|
||||
|
|
Loading…
Reference in New Issue