Commit 3f58a385 authored by Jehan's avatar Jehan

app: remove now useless erosion size option.

Since commit b00037b8, erosion size is not used anymore, as this step
has been removed, and the end point detection now uses local thickness
of strokes instead.
parent a29f73bd
......@@ -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)
......
......@@ -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)
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -47,7 +47,6 @@ struct _GimpBucketFillOptions
gdouble threshold;
gdouble line_art_threshold;
gint line_art_erosion;
GimpSelectCriterion fill_criterion;
......
......@@ -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)
......
......@@ -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);
}
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment