[gimp] app: remove now useless erosion size option.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove now useless erosion size option.
- Date: Mon, 19 Nov 2018 13:18:46 +0000 (UTC)
commit 3f58a38574773bcc1005693126ba9376fdf97b86
Author: Jehan <jehan girinstud io>
Date: Sun Nov 18 18:31:08 2018 +0100
app: remove now useless erosion size option.
Since commit b00037b850, erosion size is not used anymore, as this step
has been removed, and the end point detection now uses local thickness
of strokes instead.
app/core/gimpchannel-select.c | 2 +-
app/core/gimpdrawable-bucket-fill.c | 5 +----
app/core/gimpdrawable-bucket-fill.h | 2 --
app/core/gimplineart.c | 5 -----
app/core/gimplineart.h | 1 -
app/core/gimppickable-contiguous-region.c | 7 ++-----
app/core/gimppickable-contiguous-region.h | 4 +---
app/pdb/drawable-edit-cmds.c | 2 +-
app/tools/gimpbucketfilloptions.c | 24 ------------------------
app/tools/gimpbucketfilloptions.h | 1 -
app/tools/gimpbucketfilltool.c | 11 +----------
app/tools/gimpfuzzyselecttool.c | 2 +-
pdb/groups/drawable_edit.pdb | 2 +-
13 files changed, 9 insertions(+), 59 deletions(-)
---
diff --git a/app/core/gimpchannel-select.c b/app/core/gimpchannel-select.c
index d073635258..892dbb203e 100644
--- a/app/core/gimpchannel-select.c
+++ b/app/core/gimpchannel-select.c
@@ -522,7 +522,7 @@ gimp_channel_select_fuzzy (GimpChannel *channel,
select_transparent,
select_criterion,
diagonal_neighbors,
- 0.92, -1, /* TODO */
+ 0.92, /* TODO */
x, y);
if (! sample_merged)
diff --git a/app/core/gimpdrawable-bucket-fill.c b/app/core/gimpdrawable-bucket-fill.c
index 9c854632e2..4aebb63535 100644
--- a/app/core/gimpdrawable-bucket-fill.c
+++ b/app/core/gimpdrawable-bucket-fill.c
@@ -57,7 +57,6 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable,
gboolean sample_merged,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gdouble seed_x,
gdouble seed_y)
{
@@ -77,7 +76,7 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable,
fill_transparent, fill_criterion,
threshold, sample_merged,
diagonal_neighbors,
- stroke_threshold, erosion,
+ stroke_threshold,
seed_x, seed_y, NULL,
&mask_x, &mask_y, &width, &height);
@@ -142,7 +141,6 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable *drawable,
gboolean sample_merged,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gdouble seed_x,
gdouble seed_y,
GeglBuffer **mask_buffer,
@@ -205,7 +203,6 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable *drawable,
fill_criterion,
diagonal_neighbors,
stroke_threshold,
- erosion,
(gint) seed_x,
(gint) seed_y);
if (mask_buffer && *mask_buffer)
diff --git a/app/core/gimpdrawable-bucket-fill.h b/app/core/gimpdrawable-bucket-fill.h
index fd895f3c73..9cb566f699 100644
--- a/app/core/gimpdrawable-bucket-fill.h
+++ b/app/core/gimpdrawable-bucket-fill.h
@@ -28,7 +28,6 @@ void gimp_drawable_bucket_fill (GimpDrawable *drawabl
gboolean sample_merged,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gdouble x,
gdouble y);
GeglBuffer * gimp_drawable_get_bucket_fill_buffer (GimpDrawable *drawable,
@@ -40,7 +39,6 @@ GeglBuffer * gimp_drawable_get_bucket_fill_buffer (GimpDrawable *drawabl
gboolean sample_merged,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gdouble seed_x,
gdouble seed_y,
GeglBuffer **mask_buffer,
diff --git a/app/core/gimplineart.c b/app/core/gimplineart.c
index 582ec5f479..baeb400aff 100644
--- a/app/core/gimplineart.c
+++ b/app/core/gimplineart.c
@@ -168,10 +168,6 @@ static void gimp_edgelset_next8 (const GeglBuffer *buffer,
* luminosity.
* @stroke_threshold: [0-1] threshold value for detecting stroke pixels
* (higher values will detect more stroke pixels).
- * @erosion: size (in pixels) of the rectangular structure used to erode
- * the stroke pixels. 0 means no erosion will be done, and a
- * negative value will compute a median approximation of the
- * stroke width, for base of erosion.
* @minimal_lineart_area: the minimum size in number pixels for area to
* be considered as line art.
* @normal_estimate_mask_size:
@@ -211,7 +207,6 @@ GeglBuffer *
gimp_lineart_close (GeglBuffer *line_art,
gboolean select_transparent,
gfloat stroke_threshold,
- gint erosion,
gint minimal_lineart_area,
gint normal_estimate_mask_size,
gfloat end_point_rate,
diff --git a/app/core/gimplineart.h b/app/core/gimplineart.h
index fef94f3533..54ee9e546b 100644
--- a/app/core/gimplineart.h
+++ b/app/core/gimplineart.h
@@ -25,7 +25,6 @@
GeglBuffer * gimp_lineart_close (GeglBuffer *line_art,
gboolean select_transparent,
gfloat stroke_threshold,
- gint erosion,
gint minimal_lineart_area,
gint normal_estimate_mask_size,
gfloat end_point_rate,
diff --git a/app/core/gimppickable-contiguous-region.c b/app/core/gimppickable-contiguous-region.c
index b9cf47b35f..38a0f2ed0a 100644
--- a/app/core/gimppickable-contiguous-region.c
+++ b/app/core/gimppickable-contiguous-region.c
@@ -102,8 +102,7 @@ static void find_contiguous_region (GeglBuffer *src_buffer,
GeglBuffer *
gimp_pickable_contiguous_region_prepare_line_art (GimpPickable *pickable,
gboolean select_transparent,
- gfloat stroke_threshold,
- gint erosion)
+ gfloat stroke_threshold)
{
GeglBuffer *lineart;
gboolean has_alpha;
@@ -162,7 +161,6 @@ gimp_pickable_contiguous_region_prepare_line_art (GimpPickable *pickable,
lineart = gimp_lineart_close (lineart,
select_transparent,
stroke_threshold,
- erosion,
/*minimal_lineart_area,*/
5,
/*normal_estimate_mask_size,*/
@@ -202,7 +200,6 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
GimpSelectCriterion select_criterion,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gint x,
gint y)
{
@@ -228,7 +225,7 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
* selecting/filling through a PDB call).
*/
line_art = gimp_pickable_contiguous_region_prepare_line_art (pickable, select_transparent,
- stroke_threshold, erosion);
+ stroke_threshold);
free_line_art = TRUE;
}
diff --git a/app/core/gimppickable-contiguous-region.h b/app/core/gimppickable-contiguous-region.h
index 6c2e26ba08..b73f9aa1c4 100644
--- a/app/core/gimppickable-contiguous-region.h
+++ b/app/core/gimppickable-contiguous-region.h
@@ -21,8 +21,7 @@
GeglBuffer * gimp_pickable_contiguous_region_prepare_line_art (GimpPickable *pickable,
gboolean select_transparent,
- gfloat stroke_threshold,
- gint erosion);
+ gfloat stroke_threshold);
GeglBuffer * gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
GeglBuffer *line_art,
gboolean antialias,
@@ -31,7 +30,6 @@ GeglBuffer * gimp_pickable_contiguous_region_by_seed (GimpPickable
GimpSelectCriterion select_criterion,
gboolean diagonal_neighbors,
gfloat stroke_threshold,
- gint erosion,
gint x,
gint y);
diff --git a/app/pdb/drawable-edit-cmds.c b/app/pdb/drawable-edit-cmds.c
index 0949746bc5..3c5e307bd7 100644
--- a/app/pdb/drawable-edit-cmds.c
+++ b/app/pdb/drawable-edit-cmds.c
@@ -171,7 +171,7 @@ drawable_edit_bucket_fill_invoker (GimpProcedure *procedure,
GIMP_PDB_CONTEXT (context)->sample_threshold,
GIMP_PDB_CONTEXT (context)->sample_merged,
GIMP_PDB_CONTEXT (context)->diagonal_neighbors,
- 0.92, -1, /* TODO */
+ 0.92, /* TODO */
x, y);
}
else
diff --git a/app/tools/gimpbucketfilloptions.c b/app/tools/gimpbucketfilloptions.c
index 6672c95911..d6a4bf6e5d 100644
--- a/app/tools/gimpbucketfilloptions.c
+++ b/app/tools/gimpbucketfilloptions.c
@@ -54,7 +54,6 @@ enum
PROP_ANTIALIAS,
PROP_THRESHOLD,
PROP_LINE_ART_THRESHOLD,
- PROP_LINE_ART_EROSION,
PROP_FILL_CRITERION
};
@@ -65,7 +64,6 @@ struct _GimpBucketFillOptionsPrivate
GtkWidget *threshold_scale;
GtkWidget *line_art_threshold_scale;
- GtkWidget *line_art_erosion_scale;
};
static void gimp_bucket_fill_options_config_iface_init (GimpConfigInterface *config_iface);
@@ -164,13 +162,6 @@ gimp_bucket_fill_options_class_init (GimpBucketFillOptionsClass *klass)
0.0, 1.0, 0.92,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_PROP_INT (object_class, PROP_LINE_ART_EROSION,
- "line-art-erosion",
- _("Line art erosion"),
- _("Size in pixel to erode the line art"),
- -1, 200, -1,
- GIMP_PARAM_STATIC_STRINGS);
-
GIMP_CONFIG_PROP_ENUM (object_class, PROP_FILL_CRITERION,
"fill-criterion",
_("Fill by"),
@@ -228,9 +219,6 @@ gimp_bucket_fill_options_set_property (GObject *object,
case PROP_LINE_ART_THRESHOLD:
options->line_art_threshold = g_value_get_double (value);
break;
- case PROP_LINE_ART_EROSION:
- options->line_art_erosion = g_value_get_int (value);
- break;
case PROP_FILL_CRITERION:
options->fill_criterion = g_value_get_enum (value);
gimp_bucket_fill_options_update_criterion (options);
@@ -276,9 +264,6 @@ gimp_bucket_fill_options_get_property (GObject *object,
case PROP_LINE_ART_THRESHOLD:
g_value_set_double (value, options->line_art_threshold);
break;
- case PROP_LINE_ART_EROSION:
- g_value_set_int (value, options->line_art_erosion);
- break;
case PROP_FILL_CRITERION:
g_value_set_enum (value, options->fill_criterion);
break;
@@ -319,11 +304,9 @@ gimp_bucket_fill_options_update_criterion (GimpBucketFillOptions *options)
gtk_widget_hide (options->priv->diagonal_neighbors_checkbox);
gtk_widget_hide (options->priv->threshold_scale);
- gtk_widget_show (options->priv->line_art_erosion_scale);
gtk_widget_show (options->priv->line_art_threshold_scale);
break;
default:
- gtk_widget_hide (options->priv->line_art_erosion_scale);
gtk_widget_hide (options->priv->line_art_threshold_scale);
gtk_widget_show (options->priv->antialias_checkbox);
@@ -421,13 +404,6 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
options->priv->threshold_scale = scale;
gtk_widget_show (scale);
- /* Line Art: erosion */
- scale = gimp_prop_spin_scale_new (config, "line-art-erosion", NULL,
- 1, 10, 1);
- gtk_box_pack_start (GTK_BOX (vbox2), scale, FALSE, FALSE, 0);
- options->priv->line_art_erosion_scale = scale;
- gtk_widget_show (scale);
-
/* Line Art: stroke threshold */
scale = gimp_prop_spin_scale_new (config, "line-art-threshold", NULL,
0.05, 0.1, 2);
diff --git a/app/tools/gimpbucketfilloptions.h b/app/tools/gimpbucketfilloptions.h
index 750032cf2e..00fe5cfac2 100644
--- a/app/tools/gimpbucketfilloptions.h
+++ b/app/tools/gimpbucketfilloptions.h
@@ -47,7 +47,6 @@ struct _GimpBucketFillOptions
gdouble threshold;
gdouble line_art_threshold;
- gint line_art_erosion;
GimpSelectCriterion fill_criterion;
diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c
index 32cfd3071b..76bcdcd88e 100644
--- a/app/tools/gimpbucketfilltool.c
+++ b/app/tools/gimpbucketfilltool.c
@@ -380,7 +380,6 @@ gimp_bucket_fill_tool_preview (GimpBucketFillTool *tool,
options->sample_merged,
options->diagonal_neighbors,
options->line_art_threshold,
- options->line_art_erosion,
x, y, &tool->priv->fill_mask,
&x, &y, NULL, NULL);
if (line_art)
@@ -683,7 +682,6 @@ typedef struct
GimpPickable *pickable;
gboolean fill_transparent;
gdouble line_art_threshold;
- gint line_art_erosion;
} PrecomputeData;
static void
@@ -702,8 +700,7 @@ gimp_bucket_fill_compute_line_art_async (GimpAsync *async,
line_art = gimp_pickable_contiguous_region_prepare_line_art (data->pickable,
data->fill_transparent,
- data->line_art_threshold,
- data->line_art_erosion);
+ data->line_art_threshold);
precompute_data_free (data);
if (gimp_async_is_canceled (async))
{
@@ -767,7 +764,6 @@ gimp_bucket_fill_compute_line_art (GimpBucketFillTool *tool)
data->pickable = pickable;
data->fill_transparent = options->fill_transparent;
data->line_art_threshold = options->line_art_threshold;
- data->line_art_erosion = options->line_art_erosion;
if (tool->priv->async)
{
@@ -807,9 +803,6 @@ gimp_bucket_fill_tool_connect_handlers (gpointer data)
g_signal_connect (options, "notify::fill-transparent",
G_CALLBACK (gimp_bucket_fill_tool_options_notified),
tool);
- g_signal_connect (options, "notify::line-art-erosion",
- G_CALLBACK (gimp_bucket_fill_tool_options_notified),
- tool);
g_signal_connect (options, "notify::line-art-threshold",
G_CALLBACK (gimp_bucket_fill_tool_options_notified),
tool);
@@ -831,8 +824,6 @@ gimp_bucket_fill_tool_options_notified (GimpBucketFillOptions *options,
{
if ((! strcmp (pspec->name, "fill-criterion") ||
! strcmp (pspec->name, "fill-transparent") ||
- ! strcmp (pspec->name, "line-art-erosion") ||
- ! strcmp (pspec->name, "line-art-erosion") ||
! strcmp (pspec->name, "line-art-threshold") ||
! strcmp (pspec->name, "sample-merged")) &&
options->fill_criterion == GIMP_SELECT_CRITERION_LINE_ART)
diff --git a/app/tools/gimpfuzzyselecttool.c b/app/tools/gimpfuzzyselecttool.c
index 74b78b8c29..2f43b406c5 100644
--- a/app/tools/gimpfuzzyselecttool.c
+++ b/app/tools/gimpfuzzyselecttool.c
@@ -128,6 +128,6 @@ gimp_fuzzy_select_tool_get_mask (GimpRegionSelectTool *region_select,
options->select_transparent,
options->select_criterion,
options->diagonal_neighbors,
- 0.92, -1, /* TODO */
+ 0.92, /* TODO */
x, y);
}
diff --git a/pdb/groups/drawable_edit.pdb b/pdb/groups/drawable_edit.pdb
index 64696170b9..9687d9989f 100644
--- a/pdb/groups/drawable_edit.pdb
+++ b/pdb/groups/drawable_edit.pdb
@@ -175,7 +175,7 @@ HELP
GIMP_PDB_CONTEXT (context)->sample_threshold,
GIMP_PDB_CONTEXT (context)->sample_merged,
GIMP_PDB_CONTEXT (context)->diagonal_neighbors,
- 0.92, -1, /* TODO */
+ 0.92, /* TODO */
x, y);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]