Issue #3512 - feather selection doesn't work at edges of images

Add a "gboolean edge_lock" parameter to GimpChannel::feather() and a
"Selected areas continue outside the image" toggle to the "Feather
Selection" dialog, just like they exist for shrink selection and
border selection. At the end, convert the boolean to the right abyss
policy for gegl:gaussian-blur.

(cherry picked from commit aace6b179b)
This commit is contained in:
Michael Natterer
2019-06-16 16:51:30 +02:00
parent ddb704634e
commit a65042aebf
11 changed files with 92 additions and 20 deletions

View File

@ -98,6 +98,7 @@ enum
PROP_VECTORS_IMPORT_SCALE,
PROP_SELECTION_FEATHER_RADIUS,
PROP_SELECTION_FEATHER_EDGE_LOCK,
PROP_SELECTION_GROW_RADIUS,
@ -465,6 +466,13 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
0.0, 32767.0, 5.0,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECTION_FEATHER_EDGE_LOCK,
"selection-feather-edge-lock",
"Selection feather edge lock",
SELECTION_FEATHER_EDGE_LOCK_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SELECTION_GROW_RADIUS,
"selection-grow-radius",
"Selection grow radius",
@ -736,6 +744,9 @@ gimp_dialog_config_set_property (GObject *object,
case PROP_SELECTION_FEATHER_RADIUS:
config->selection_feather_radius = g_value_get_double (value);
break;
case PROP_SELECTION_FEATHER_EDGE_LOCK:
config->selection_feather_edge_lock = g_value_get_boolean (value);
break;
case PROP_SELECTION_GROW_RADIUS:
config->selection_grow_radius = g_value_get_double (value);
@ -921,6 +932,9 @@ gimp_dialog_config_get_property (GObject *object,
case PROP_SELECTION_FEATHER_RADIUS:
g_value_set_double (value, config->selection_feather_radius);
break;
case PROP_SELECTION_FEATHER_EDGE_LOCK:
g_value_set_boolean (value, config->selection_feather_edge_lock);
break;
case PROP_SELECTION_GROW_RADIUS:
g_value_set_double (value, config->selection_grow_radius);