[gimp/soc-2009-siox-drb] frame alter
- From: Jie Ding <jieding src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp/soc-2009-siox-drb] frame alter
- Date: Fri, 10 Jul 2009 08:43:16 +0000 (UTC)
commit 443eb7d97aa16349d34b9a6838030aa3fd5a6588
Author: Jie Ding <jieding src gnome org>
Date: Fri Jul 10 16:42:17 2009 +0800
frame alter
app/base/siox.c | 35 +++++++---
app/base/siox.h | 7 +--
app/core/gimpdrawable-foreground-extract.c | 43 ++++++-------
app/core/gimpdrawable-foreground-extract.h | 12 ++--
app/tools/gimpforegroundselectoptions.c | 94 ++++++++++++++--------------
app/tools/gimpforegroundselectoptions.h | 4 +-
app/tools/gimpforegroundselecttool.c | 79 ++++++++++++------------
app/tools/gimpforegroundselecttool.h | 4 +-
8 files changed, 144 insertions(+), 134 deletions(-)
---
diff --git a/app/base/siox.c b/app/base/siox.c
index 543da16..c6b83c3 100644
--- a/app/base/siox.c
+++ b/app/base/siox.c
@@ -828,7 +828,7 @@ siox_foreground_extract (SioxState *state,
const gdouble sensitivity[3],
gboolean multiblob,
SioxProgressFunc progress_callback,
- gpointer progress_data)
+ gpointer progress_data)
{
PixelRegion srcPR;
PixelRegion mapPR;
@@ -882,7 +882,7 @@ siox_foreground_extract (SioxState *state,
else
{
if (! state->bgsig)
- refinement |= SIOX_REFINEMENT_ADD_BACKGROUND;
+ refinement |= SIOX_REFINEMENT_ADD_BACKGROUND;
if (! state->fgsig)
refinement |= SIOX_REFINEMENT_ADD_FOREGROUND;
@@ -1091,7 +1091,7 @@ siox_foreground_extract (SioxState *state,
siox_progress_update (progress_callback, progress_data, 0.4);
if (refinement & SIOX_REFINEMENT_ADD_FOREGROUND)
- {printf("siox_foreground_extract/Create color signature for the foreground\n");
+ {
/* Create color signature for the foreground */
state->fgsig = create_signature (surefg, surefgcount,
&state->fgsiglen, limits,
@@ -1284,15 +1284,13 @@ siox_foreground_extract (SioxState *state,
* needed to evaluate performance of this!
*/
void
-//SioxState *
siox_drb (SioxState *state,
TileManager *mask,
gint x,
gint y,
gint brush_radius,
- SioxDRBType optionsrefinement,//
- gfloat threshold,
- gpointer progress_data)//
+ SioxDRBType optionsrefinement,\
+ gfloat threshold)
{
PixelRegion srcPR;
PixelRegion mapPR;
@@ -1302,7 +1300,7 @@ siox_drb (SioxState *state,
g_return_if_fail (state != NULL);
g_return_if_fail (mask != NULL && tile_manager_bpp (mask) == 1);
-
+/*
if (optionsrefinement & SIOX_DRB_ADD)
g_hash_table_foreach_remove(state->cache,siox_cache_remove_bg,NULL);
if (optionsrefinement & SIOX_DRB_SUBTRACT)
@@ -1310,12 +1308,27 @@ siox_drb (SioxState *state,
if (optionsrefinement & SIOX_DRB_CHANGE_THRESHOLD)
optionsrefinement = SIOX_DRB_RECALCULATE;
- pixel_region_init (&srcPR, state->pixels,
+/*pixel_region_init (&srcPR, state->pixels,
x - brush_radius, y - brush_radius, brush_radius * 2,
brush_radius * 2, FALSE);
- pixel_region_init (&mapPR, mask, x - brush_radius, y - brush_radius,
+
+ pixel_region_init (&mapPR, mask, x - brush_radius, y - brush_radius,
brush_radius * 2, brush_radius * 2, TRUE);
-
+*/
+ /* pixel_region_init (&srcPR, state->pixels,
+ x , y , state->width, state->height, FALSE);
+ pixel_region_init (&mapPR, mask, x, y,
+ brush_radius * 2,
+ brush_radius * 2, TRUE);
+*/
+ pixel_region_init (&srcPR, state->pixels,
+ x , y , state->width, state->height, FALSE);
+ pixel_region_init (&mapPR, mask, x, y,
+ brush_radius * 2,
+ brush_radius * 2, TRUE);
+/*
+
+*/
for (pr = pixel_regions_register (2, &srcPR, &mapPR);
pr != NULL;
pr = pixel_regions_process (pr))
diff --git a/app/base/siox.h b/app/base/siox.h
index e278c33..78f3df9 100644
--- a/app/base/siox.h
+++ b/app/base/siox.h
@@ -72,16 +72,13 @@ void siox_foreground_extract (SioxState *state,
gpointer progress_data);
void siox_done (SioxState *state);
-
-//SioxState *
void siox_drb (SioxState *state,
TileManager *mask,
gint x,
gint y,
gint brush_radius,
- SioxDRBType optionsrefinement,//
- gfloat threshold,
- gpointer progress_data);//(new)
+ SioxDRBType optionsrefinement,
+ gfloat threshold);
#endif /* __SIOX_H__ */
diff --git a/app/core/gimpdrawable-foreground-extract.c b/app/core/gimpdrawable-foreground-extract.c
index 614132e..d12a12c 100644
--- a/app/core/gimpdrawable-foreground-extract.c
+++ b/app/core/gimpdrawable-foreground-extract.c
@@ -65,13 +65,13 @@ gimp_drawable_foreground_extract (GimpDrawable *drawable,
{
gimp_drawable_foreground_extract_siox (mask, state,
SIOX_REFINEMENT_RECALCULATE,
- SIOX_DEFAULT_SMOOTHNESS,
- SIOX_DEFAULT_THRESHOLD ,//
- SIOX_DRB_RECALCULATE ,//
+ SIOX_DEFAULT_SMOOTHNESS,
+ SIOX_DEFAULT_THRESHOLD,
+ SIOX_DRB_RECALCULATE,
sensitivity,
FALSE,
- FALSE,//(new)
- 18,//
+ FALSE,
+ 18,
progress);
gimp_drawable_foreground_extract_siox_done (state);
@@ -165,9 +165,9 @@ gimp_drawable_foreground_extract_siox (GimpDrawable *mask,
}
else
{
- gimp_drawable_foreground_extract_siox_drb(gimp_drawable_get_tiles (mask),
- state,sioxdrboption,sioxdrbthreshold,
- brush_radius,progress);
+ gimp_drawable_foreground_extract_siox_drb (gimp_drawable_get_tiles (mask),
+ state,sioxdrboption,sioxdrbthreshold,
+ brush_radius,progress);
}
if (progress)
gimp_progress_end (progress);
@@ -185,23 +185,22 @@ gimp_drawable_foreground_extract_siox_done (SioxState *state)
void
-gimp_drawable_foreground_extract_siox_drb(TileManager *mask,
- SioxState *state,
- SioxDRBType optionsrefinement,
- gfloat optionsthreshold,
- gint radius,
- GimpProgress *progress)
+gimp_drawable_foreground_extract_siox_drb (TileManager *mask,
+ SioxState *state,
+ SioxDRBType optionsrefinement,
+ gfloat optionsthreshold,
+ gint radius,
+ GimpProgress *progress)
{
gint x = (state->x);
gint y = (state->y);
- siox_drb(state,//
- mask,//
- x,y,
- radius,
- optionsrefinement,//
- optionsthreshold,
- progress);
-
+ siox_drb (state,
+ mask,
+ x,y,
+ radius,
+ optionsrefinement,
+ optionsthreshold,
+ progress);
}
diff --git a/app/core/gimpdrawable-foreground-extract.h b/app/core/gimpdrawable-foreground-extract.h
index 4c9fd4d..ec638de 100644
--- a/app/core/gimpdrawable-foreground-extract.h
+++ b/app/core/gimpdrawable-foreground-extract.h
@@ -46,11 +46,11 @@ void gimp_drawable_foreground_extract_siox (GimpDrawable *mask,
GimpProgress *progress);
void gimp_drawable_foreground_extract_siox_done (SioxState *state);
-void gimp_drawable_foreground_extract_siox_drb(TileManager *mask,
- SioxState *state,
- SioxDRBType optionsrefinement,
- gfloat optionsthreshold,
- gint radius,
- GimpProgress *progress);
+void gimp_drawable_foreground_extract_siox_drb (TileManager *mask,
+ SioxState *state,
+ SioxDRBType optionsrefinement,
+ gfloat optionsthreshold,
+ gint radius,
+ GimpProgress *progress);
#endif /* __GIMP_DRAWABLE_FOREGROUND_EXTRACT_H__ */
diff --git a/app/tools/gimpforegroundselectoptions.c b/app/tools/gimpforegroundselectoptions.c
index 51e7371..5059f6c 100644
--- a/app/tools/gimpforegroundselectoptions.c
+++ b/app/tools/gimpforegroundselectoptions.c
@@ -40,10 +40,10 @@ enum
PROP_ANTIALIAS,
PROP_CONTIGUOUS,
PROP_BACKGROUND,
- PROP_REFINEMENT,//(new)
+ PROP_REFINEMENT,
PROP_STROKE_WIDTH,
PROP_SMOOTHNESS,
- PROP_THRESHOLD,//(new)
+ PROP_THRESHOLD,
PROP_MASK_COLOR,
PROP_EXPANDED,
PROP_SENSITIVITY_L,
@@ -92,10 +92,10 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla
FALSE,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_REFINEMENT,//(new)
- "refinement", NULL,//(new)
- FALSE,//(new)
- GIMP_PARAM_STATIC_STRINGS);//(new)
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_REFINEMENT,
+ "refinement", NULL,
+ FALSE,
+ GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_STROKE_WIDTH,
"stroke-width",
@@ -111,12 +111,12 @@ gimp_foreground_select_options_class_init (GimpForegroundSelectOptionsClass *kla
0, 8, SIOX_DEFAULT_SMOOTHNESS,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_THRESHOLD,//(new)
- "threshold",//(new)
- _("Range for SIOX_DRB_ADD:1.0"//(new)
- "Range for SIOX_DRB_ADD:0.0"),//(new)
- 0.0, 1.0, SIOX_DEFAULT_THRESHOLD,//(new)
- GIMP_PARAM_STATIC_STRINGS); //(new)
+ GIMP_CONFIG_INSTALL_PROP_DOUBLE (object_class, PROP_THRESHOLD,
+ "threshold",
+ _("Range for SIOX_DRB_ADD:1.0"
+ "Range for SIOX_DRB_ADD:0.0"),
+ 0.0, 1.0, SIOX_DEFAULT_THRESHOLD,
+ GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_MASK_COLOR,
"mask-color", NULL,
@@ -175,9 +175,9 @@ gimp_foreground_select_options_set_property (GObject *object,
options->background = g_value_get_boolean (value);
break;
- case PROP_REFINEMENT://(new)
- options->refinement = g_value_get_boolean (value);//(new)
- break;//(new)
+ case PROP_REFINEMENT:
+ options->refinement = g_value_get_boolean (value);
+ break;
case PROP_STROKE_WIDTH:
options->stroke_width = g_value_get_int (value);
@@ -187,9 +187,9 @@ gimp_foreground_select_options_set_property (GObject *object,
options->smoothness = g_value_get_int (value);
break;
- case PROP_THRESHOLD://(new)
- options->threshold = g_value_get_double (value);//(new)
- break;//(new)
+ case PROP_THRESHOLD:
+ options->threshold = g_value_get_double (value);
+ break;
case PROP_MASK_COLOR:
options->mask_color = g_value_get_enum (value);
@@ -239,9 +239,9 @@ gimp_foreground_select_options_get_property (GObject *object,
g_value_set_boolean (value, options->background);
break;
- case PROP_REFINEMENT://(new)
- g_value_set_boolean (value, options->refinement);//(new)
- break;//(new)
+ case PROP_REFINEMENT:
+ g_value_set_boolean (value, options->refinement);
+ break;
case PROP_STROKE_WIDTH:
g_value_set_int (value, options->stroke_width);
@@ -251,9 +251,9 @@ gimp_foreground_select_options_get_property (GObject *object,
g_value_set_int (value, options->smoothness);
break;
- case PROP_THRESHOLD://(new)//(should be float )
- g_value_set_double (value, options->threshold);//(new)
- break;//(new)
+ case PROP_THRESHOLD:
+ g_value_set_double (value, options->threshold);
+ break;
case PROP_MASK_COLOR:
g_value_set_enum (value, options->mask_color);
@@ -289,14 +289,14 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *frame;
- GtkWidget *frame_drb;//(new)
+ GtkWidget *frame_drb;
GtkWidget *scale;
- GtkWidget *scale_t;//(new)
+ GtkWidget *scale_t;
GtkWidget *label;
GtkWidget *menu;
GtkWidget *inner_frame;
GtkWidget *table;
- GtkWidget *table_t;//(new)
+ GtkWidget *table_t;
GtkObject *adj;
gchar *title;
gint row = 0;
@@ -322,17 +322,17 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
gtk_widget_show (frame);
/* add / subtract */
- title = g_strdup_printf (_("Detail Refinement Brush (%s)"),//(new)
- gimp_get_mod_string (GDK_CONTROL_MASK));//(new)
+ title = g_strdup_printf (_("Detail Refinement Brush (%s)"),
+ gimp_get_mod_string (GDK_CONTROL_MASK));
- frame_drb = gimp_prop_boolean_radio_frame_new (config, "refinement", title,//(new)
- _("Subtract"),//(new)
- _("Add"));//(new)
+ frame_drb = gimp_prop_boolean_radio_frame_new (config, "refinement", title,
+ _("Subtract"),
+ _("Add"));
- g_free (title);//(new)
+ g_free (title);
- gtk_box_pack_start (GTK_BOX (vbox), frame_drb, FALSE, FALSE, 0);//(new)
- gtk_widget_show (frame_drb);//(new)
+ gtk_box_pack_start (GTK_BOX (vbox), frame_drb, FALSE, FALSE, 0);
+ gtk_widget_show (frame_drb);
/* stroke width */
@@ -366,18 +366,18 @@ gimp_foreground_select_options_gui (GimpToolOptions *tool_options)
gtk_box_pack_start (GTK_BOX (inner_frame), scale, FALSE, FALSE, 0);
gtk_widget_show (scale);
- /* threshold */ //(new)
- table_t = gtk_table_new (2, 3, FALSE);//(new)
- gtk_table_set_row_spacings (GTK_TABLE (table_t), 2);//(new)
- gtk_table_set_col_spacings (GTK_TABLE (table_t), 2);//(new)
- gtk_box_pack_start (GTK_BOX (vbox), table_t, FALSE, FALSE, 0);//(new)
- gtk_widget_show (table_t);//(new)
-
- scale_t = gimp_prop_hscale_new (config, "threshold", 0.01, 0.1, 3);//(new)
- gtk_range_set_update_policy (GTK_RANGE (scale_t), GTK_UPDATE_DELAYED);//(new)
- gtk_scale_set_value_pos (GTK_SCALE (scale_t), GTK_POS_RIGHT);//(new)
- gimp_table_attach_aligned (GTK_TABLE (table_t), 0, 0,//(new)
- _("Threshold:"), 0.0, 0.5, scale_t, 2, FALSE);//(new)
+ /* threshold */
+ table_t = gtk_table_new (2, 3, FALSE);
+ gtk_table_set_row_spacings (GTK_TABLE (table_t), 2);
+ gtk_table_set_col_spacings (GTK_TABLE (table_t), 2);
+ gtk_box_pack_start (GTK_BOX (vbox), table_t, FALSE, FALSE, 0);
+ gtk_widget_show (table_t);
+
+ scale_t = gimp_prop_hscale_new (config, "threshold", 0.01, 0.1, 3);
+ gtk_range_set_update_policy (GTK_RANGE (scale_t), GTK_UPDATE_DELAYED);
+ gtk_scale_set_value_pos (GTK_SCALE (scale_t), GTK_POS_RIGHT);
+ gimp_table_attach_aligned (GTK_TABLE (table_t), 0, 0,
+ _("Threshold:"), 0.0, 0.5, scale_t, 2, FALSE);
/* smoothness */
table = gtk_table_new (2, 3, FALSE);
diff --git a/app/tools/gimpforegroundselectoptions.h b/app/tools/gimpforegroundselectoptions.h
index 83ac781..47e8c89 100644
--- a/app/tools/gimpforegroundselectoptions.h
+++ b/app/tools/gimpforegroundselectoptions.h
@@ -39,10 +39,10 @@ struct _GimpForegroundSelectOptions
gboolean contiguous;
gboolean background;
- gboolean refinement;//(new)
+ gboolean refinement;
gint stroke_width;
gint smoothness;
- gdouble threshold;//(new should be float)
+ gdouble threshold;
GimpChannelType mask_color;
gboolean expanded;
gdouble sensitivity[3];
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 237b53a..55e1421 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -238,10 +238,10 @@ gimp_foreground_select_tool_finalize (GObject *object)
if (fg_select->strokes)
g_warning ("%s: strokes should be NULL at this point", G_STRLOC);
- if (fg_select->drbsignal)//
+ if (fg_select->drbsignal)
g_warning ("%s: drbsignal should be NULL at this point", G_STRLOC);
- if (fg_select->drbsignals)//
+ if (fg_select->drbsignals)
g_warning ("%s: drbsignals should be NULL at this point", G_STRLOC);
if (fg_select->state)
@@ -267,9 +267,9 @@ gimp_foreground_select_tool_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_HALT:
- { printf("gimp_foreground_select_tool_control/GIMP_TOOL_ACTION_HALT \n");
+ {
GList *list;
- GList *drblist;//
+ GList *drblist;
gimp_foreground_select_tool_set_mask (fg_select, display, NULL);
for (list = fg_select->strokes; list; list = list->next)
@@ -279,7 +279,7 @@ gimp_foreground_select_tool_control (GimpTool *tool,
g_free (stroke->points);
g_slice_free (FgSelectStroke, stroke);
}
- for (drblist = fg_select->drbsignals; drblist; drblist = drblist->next)//(new)
+ for (drblist = fg_select->drbsignals; drblist; drblist = drblist->next)
{
FgSelectStroke *drbsignal = drblist->data;
@@ -296,7 +296,7 @@ gimp_foreground_select_tool_control (GimpTool *tool,
{
gimp_drawable_foreground_extract_siox_done (fg_select->state);
fg_select->state = NULL;
- mark_drb = FALSE; //(new)
+ mark_drb = FALSE;
}
tool->display = NULL;
@@ -337,7 +337,7 @@ gimp_foreground_select_tool_oper_update (GimpTool *tool,
case SELECTION_ANCHOR:
if (fg_select->strokes)
{
- if(!fg_select->drbsignal)//(new)
+ if(!fg_select->drbsignal)
status = _("Add more strokes or press Up to drb");
else
status = _("Add more drb or press Enter to accept the selection");
@@ -437,7 +437,7 @@ gimp_foreground_select_tool_key_press (GimpTool *tool,
case GDK_Up:
mark_drb = TRUE;
printf("click Up\n");
- G_CALLBACK (gimp_foreground_select_options_notify);//?
+ G_CALLBACK (gimp_foreground_select_options_notify);
return TRUE;
case GDK_Return:
@@ -474,7 +474,7 @@ gimp_foreground_select_tool_button_press (GimpTool *tool,
GimpForegroundSelectTool *fg_select = GIMP_FOREGROUND_SELECT_TOOL (tool);
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
- if (fg_select->mask &&(!mark_drb))//
+ if (fg_select->mask &&(!mark_drb))
{
GimpVector2 point = gimp_vector2_new (coords->x, coords->y);
@@ -494,22 +494,22 @@ gimp_foreground_select_tool_button_press (GimpTool *tool,
g_array_append_val (fg_select->stroke, point);
if (! gimp_draw_tool_is_active (draw_tool))
- gimp_draw_tool_start (draw_tool, display);
+ gimp_draw_tool_start (draw_tool, display);
gimp_draw_tool_resume (draw_tool);
}
- else if (fg_select->mask && mark_drb)//
+ else if (fg_select->mask && mark_drb)
{
GimpVector2 point = gimp_vector2_new (coords->x, coords->y);
gimp_draw_tool_pause (draw_tool);
- if (gimp_draw_tool_is_active (draw_tool) && draw_tool->display != display)//?
- gimp_draw_tool_stop (draw_tool);
+ if (gimp_draw_tool_is_active (draw_tool) && draw_tool->display != display)
+ gimp_draw_tool_stop (draw_tool);
if (! gimp_tool_control_is_active (tool->control))
- gimp_tool_control_activate (tool->control);
+ gimp_tool_control_activate (tool->control);
fg_select->last_coords = *coords;
@@ -519,7 +519,7 @@ gimp_foreground_select_tool_button_press (GimpTool *tool,
g_array_append_val (fg_select->drbsignal, point);
if (! gimp_draw_tool_is_active (draw_tool))
- gimp_draw_tool_start (draw_tool, display);
+ gimp_draw_tool_start (draw_tool, display);
gimp_draw_tool_resume (draw_tool);
}
@@ -593,7 +593,7 @@ gimp_foreground_select_tool_motion (GimpTool *tool,
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
- else if (fg_select->mask && mark_drb) //(new)
+ else if (fg_select->mask && mark_drb)
{
GimpVector2 *last = &g_array_index (fg_select->drbsignal,
GimpVector2,
@@ -649,7 +649,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (tool);
- if (fg_select->stroke && (!mark_drb))//
+ if (fg_select->stroke && (!mark_drb))
{
gimp_display_shell_draw_pen (GIMP_DISPLAY_SHELL (draw_tool->display->shell),
(const GimpVector2 *)fg_select->stroke->data,
@@ -660,7 +660,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
GIMP_ACTIVE_COLOR_FOREGROUND),
options->stroke_width);
}
- if (fg_select->stroke && mark_drb) //
+ if (fg_select->stroke && mark_drb)
{
gimp_display_shell_draw_pen (GIMP_DISPLAY_SHELL (draw_tool->display->shell),
(const GimpVector2 *)fg_select->drbsignal->data,
@@ -668,7 +668,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
GIMP_CONTEXT (options),
(options->refinement ?
GIMP_ACTIVE_COLOR_BACKGROUND :
- GIMP_ACTIVE_COLOR_BACKGROUND),//???????
+ GIMP_ACTIVE_COLOR_BACKGROUND),
options->stroke_width);
}
if (fg_select->mask)
@@ -749,7 +749,7 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
mask = gimp_channel_new (image,
gimp_image_get_width (image),
gimp_image_get_height (image),
- "foreground-extraction", NULL);//????????
+ "foreground-extraction", NULL);
gimp_scan_convert_render_value (scan_convert,
gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
@@ -761,27 +761,28 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
GList *list;
GList *drblist;
gimp_set_busy (image->gimp);
- if(!mark_drb) //
+ if(!mark_drb)
+
/* apply foreground and background markers */
for (list = fg_select->strokes; list; list = list->next)
gimp_foreground_select_tool_stroke (mask, list->data);
else if (mark_drb)
for (drblist = fg_select->drbsignals; drblist; drblist = drblist->next)
- gimp_foreground_select_tool_stroke (mask, drblist->data);//(alter)
+ gimp_foreground_select_tool_stroke (mask, drblist->data);
if (fg_select->state)
{ printf("fg_select->state\n");
gimp_drawable_foreground_extract_siox (GIMP_DRAWABLE (mask),
- fg_select->state,
- fg_select->refinement,
- options->smoothness,
- options->threshold,//(new)
- fg_select->drbrefinement,//
- options->sensitivity,
- ! options->contiguous,
- mark_drb,//
- options->stroke_width,//(new)
- GIMP_PROGRESS (display));
+ fg_select->state,
+ fg_select->refinement,
+ options->smoothness,
+ options->threshold,
+ fg_select->drbrefinement,
+ options->sensitivity,
+ ! options->contiguous,
+ mark_drb,
+ options->stroke_width,
+ GIMP_PROGRESS (display));
fg_select->refinement = SIOX_REFINEMENT_NO_CHANGE;
fg_select->drbrefinement = SIOX_DRB_NO_CHANGE ;
@@ -917,8 +918,8 @@ gimp_foreground_select_tool_stroke (GimpChannel *mask,
GIMP_JOIN_ROUND, GIMP_CAP_ROUND, 10.0,
0.0, NULL);
gimp_scan_convert_compose_value (scan_convert,
- gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
- 0, 0, stroke->background ? 0 : 255);
+ gimp_drawable_get_tiles (GIMP_DRAWABLE (mask)),
+ 0, 0, stroke->background ? 0 : 255);
gimp_scan_convert_free (scan_convert);
}
@@ -954,7 +955,7 @@ else
stroke = g_slice_new (FgSelectStroke);
- stroke->background = options->refinement;//
+ stroke->background = options->refinement;
stroke->width = ROUND ((gdouble) options->stroke_width / shell->scale_y);
stroke->num_points = fg_select->drbsignal->len;
stroke->points = (GimpVector2 *) g_array_free (fg_select->drbsignal, FALSE);
@@ -964,8 +965,8 @@ else
fg_select->drbsignals = g_list_append (fg_select->drbsignals, stroke);
fg_select->drbrefinement |= (stroke->background?
- SIOX_DRB_ADD :
- SIOX_DRB_SUBTRACT);
+ SIOX_DRB_ADD :
+ SIOX_DRB_SUBTRACT);
}
}
@@ -988,7 +989,7 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
GimpForegroundSelectTool *fg_select)
{
SioxRefinementType refinement = 0;
- SioxDRBType drbrefinement = 0; //
+ SioxDRBType drbrefinement = 0;
if (!mark_drb)
{
if (!fg_select->mask)
@@ -1008,7 +1009,7 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
if (! fg_select->mask)
return;
- if (strcmp (pspec->name, "threshold") == 0)//(new)
+ if (strcmp (pspec->name, "threshold") == 0)
drbrefinement = SIOX_DRB_CHANGE_THRESHOLD;
else if (strcmp (pspec->name, "smoothness") == 0)
diff --git a/app/tools/gimpforegroundselecttool.h b/app/tools/gimpforegroundselecttool.h
index 730c821..09189ee 100644
--- a/app/tools/gimpforegroundselecttool.h
+++ b/app/tools/gimpforegroundselecttool.h
@@ -43,12 +43,12 @@ struct _GimpForegroundSelectTool
guint idle_id;
GArray *stroke;
GList *strokes;
- GArray *drbsignal;//(new)
+ GArray *drbsignal;
GList *drbsignals;
GimpChannel *mask;
SioxState *state;
SioxRefinementType refinement;
- SioxDRBType drbrefinement;//(new)
+ SioxDRBType drbrefinement;
};
struct _GimpForegroundSelectToolClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]