[gimp] app,pdb: Sort compatibility wrappers in alphabetical order
- From: Téo Mazars <teom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app,pdb: Sort compatibility wrappers in alphabetical order
- Date: Fri, 11 Oct 2013 06:04:33 +0000 (UTC)
commit 786b21ee1018592f89094e65035aebbbe5ae168b
Author: Téo Mazars <teo mazars ensimag fr>
Date: Fri Oct 11 07:59:06 2013 +0200
app,pdb: Sort compatibility wrappers in alphabetical order
app/pdb/plug-in-compat-cmds.c | 266 +++++++++++++++++-----------------
tools/pdbgen/pdb/plug_in_compat.pdb | 158 +++++++++++-----------
2 files changed, 212 insertions(+), 212 deletions(-)
---
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index 732ba50..c317d00 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -434,6 +434,60 @@ plug_in_cubism_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
+plug_in_hsv_noise_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
+{
+ gboolean success = TRUE;
+ GimpDrawable *drawable;
+ gint32 holdness;
+ gint32 hue_distance;
+ gint32 saturation_distance;
+ gint32 value_distance;
+
+ drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+ holdness = g_value_get_int (gimp_value_array_index (args, 3));
+ hue_distance = g_value_get_int (gimp_value_array_index (args, 4));
+ saturation_distance = g_value_get_int (gimp_value_array_index (args, 5));
+ value_distance = g_value_get_int (gimp_value_array_index (args, 6));
+
+ if (success)
+ {
+ if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+ GIMP_PDB_ITEM_CONTENT, error) &&
+ gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
+ {
+ GeglNode *node;
+
+ gdouble saturation = saturation_distance / 255.0;
+ gdouble value = value_distance / 255.0;
+
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:noise-hsv",
+ "holdness", (gint) holdness,
+ "hue-distance", (gdouble) hue_distance,
+ "saturation-distance", (gdouble) saturation,
+ "value-distance", (gdouble) value,
+ NULL);
+
+ gimp_drawable_apply_operation (drawable, progress,
+ C_("undo-type", "Noise HSV"),
+ node);
+
+ g_object_unref (node);
+ }
+ else
+ success = FALSE;
+ }
+
+ return gimp_procedure_get_return_values (procedure, success,
+ error ? *error : NULL);
+}
+
+static GimpValueArray *
plug_in_laplace_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -471,25 +525,17 @@ plug_in_laplace_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
-plug_in_hsv_noise_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
+plug_in_make_seamless_invoker (GimpProcedure *procedure,
+ Gimp *gimp,
+ GimpContext *context,
+ GimpProgress *progress,
+ const GimpValueArray *args,
+ GError **error)
{
gboolean success = TRUE;
GimpDrawable *drawable;
- gint32 holdness;
- gint32 hue_distance;
- gint32 saturation_distance;
- gint32 value_distance;
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
- holdness = g_value_get_int (gimp_value_array_index (args, 3));
- hue_distance = g_value_get_int (gimp_value_array_index (args, 4));
- saturation_distance = g_value_get_int (gimp_value_array_index (args, 5));
- value_distance = g_value_get_int (gimp_value_array_index (args, 6));
if (success)
{
@@ -497,21 +543,13 @@ plug_in_hsv_noise_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GeglNode *node;
-
- gdouble saturation = saturation_distance / 255.0;
- gdouble value = value_distance / 255.0;
-
- node = gegl_node_new_child (NULL,
- "operation", "gegl:noise-hsv",
- "holdness", (gint) holdness,
- "hue-distance", (gdouble) hue_distance,
- "saturation-distance", (gdouble) saturation,
- "value-distance", (gdouble) value,
- NULL);
+ GeglNode *node =
+ gegl_node_new_child (NULL,
+ "operation", "gegl:tile-seamless",
+ NULL);
gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Noise HSV"),
+ C_("undo-type", "Tile Seamless"),
node);
g_object_unref (node);
@@ -1350,44 +1388,6 @@ plug_in_threshold_alpha_invoker (GimpProcedure *procedure,
}
static GimpValueArray *
-plug_in_make_seamless_invoker (GimpProcedure *procedure,
- Gimp *gimp,
- GimpContext *context,
- GimpProgress *progress,
- const GimpValueArray *args,
- GError **error)
-{
- gboolean success = TRUE;
- GimpDrawable *drawable;
-
- drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
-
- if (success)
- {
- if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
- GIMP_PDB_ITEM_CONTENT, error) &&
- gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
- {
- GeglNode *node =
- gegl_node_new_child (NULL,
- "operation", "gegl:tile-seamless",
- NULL);
-
- gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Tile Seamless"),
- node);
-
- g_object_unref (node);
- }
- else
- success = FALSE;
- }
-
- return gimp_procedure_get_return_values (procedure, success,
- error ? *error : NULL);
-}
-
-static GimpValueArray *
plug_in_vinvert_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
@@ -1939,6 +1939,66 @@ register_plug_in_compat_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
+ * gimp-plug-in-hsv-noise
+ */
+ procedure = gimp_procedure_new (plug_in_hsv_noise_invoker);
+ gimp_object_set_static_name (GIMP_OBJECT (procedure),
+ "plug-in-hsv-noise");
+ gimp_procedure_set_static_strings (procedure,
+ "plug-in-hsv-noise",
+ "Randomize hue, saturation and value independently",
+ "Scattering pixel values in HSV space",
+ "Compatibility procedure. Please see 'gegl:noise-hsv' for credits.",
+ "Compatibility procedure. Please see 'gegl:noise-hsv' for credits.",
+ "2013",
+ NULL);
+ gimp_procedure_add_argument (procedure,
+ g_param_spec_enum ("run-mode",
+ "run mode",
+ "The run mode",
+ GIMP_TYPE_RUN_MODE,
+ GIMP_RUN_INTERACTIVE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_image_id ("image",
+ "image",
+ "Input image (unused)",
+ pdb->gimp, FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_drawable_id ("drawable",
+ "drawable",
+ "Input drawable",
+ pdb->gimp, FALSE,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_int32 ("holdness",
+ "holdness",
+ "Convolution strength",
+ 1, 8, 1,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_int32 ("hue-distance",
+ "hue distance",
+ "Scattering of hue angle",
+ 0, 180, 0,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_int32 ("saturation-distance",
+ "saturation distance",
+ "Distribution distance on saturation axis",
+ 0, 255, 0,
+ GIMP_PARAM_READWRITE));
+ gimp_procedure_add_argument (procedure,
+ gimp_param_spec_int32 ("value-distance",
+ "value distance",
+ "Distribution distance on value axis",
+ 0, 255, 0,
+ GIMP_PARAM_READWRITE));
+ gimp_pdb_register_procedure (pdb, procedure);
+ g_object_unref (procedure);
+
+ /*
* gimp-plug-in-laplace
*/
procedure = gimp_procedure_new (plug_in_laplace_invoker);
@@ -1975,17 +2035,17 @@ register_plug_in_compat_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-plug-in-hsv-noise
+ * gimp-plug-in-make-seamless
*/
- procedure = gimp_procedure_new (plug_in_hsv_noise_invoker);
+ procedure = gimp_procedure_new (plug_in_make_seamless_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "plug-in-hsv-noise");
+ "plug-in-make-seamless");
gimp_procedure_set_static_strings (procedure,
- "plug-in-hsv-noise",
- "Randomize hue, saturation and value independently",
- "Scattering pixel values in HSV space",
- "Compatibility procedure. Please see 'gegl:noise-hsv' for credits.",
- "Compatibility procedure. Please see 'gegl:noise-hsv' for credits.",
+ "plug-in-make-seamless",
+ "Alters edges to make the image seamlessly tileable",
+ "This plugin creates a seamless tileable from the input drawable.",
+ "Compatibility procedure. Please see 'gegl:tile-seamless' for credits.",
+ "Compatibility procedure. Please see 'gegl:tile-seamless' for credits.",
"2013",
NULL);
gimp_procedure_add_argument (procedure,
@@ -2007,30 +2067,6 @@ register_plug_in_compat_procs (GimpPDB *pdb)
"Input drawable",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_int32 ("holdness",
- "holdness",
- "Convolution strength",
- 1, 8, 1,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_int32 ("hue-distance",
- "hue distance",
- "Scattering of hue angle",
- 0, 180, 0,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_int32 ("saturation-distance",
- "saturation distance",
- "Distribution distance on saturation axis",
- 0, 255, 0,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_int32 ("value-distance",
- "value distance",
- "Distribution distance on value axis",
- 0, 255, 0,
- GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2875,42 +2911,6 @@ register_plug_in_compat_procs (GimpPDB *pdb)
g_object_unref (procedure);
/*
- * gimp-plug-in-make-seamless
- */
- procedure = gimp_procedure_new (plug_in_make_seamless_invoker);
- gimp_object_set_static_name (GIMP_OBJECT (procedure),
- "plug-in-make-seamless");
- gimp_procedure_set_static_strings (procedure,
- "plug-in-make-seamless",
- "Alters edges to make the image seamlessly tileable",
- "This plugin creates a seamless tileable from the input drawable.",
- "Compatibility procedure. Please see 'gegl:tile-seamless' for credits.",
- "Compatibility procedure. Please see 'gegl:tile-seamless' for credits.",
- "2013",
- NULL);
- gimp_procedure_add_argument (procedure,
- g_param_spec_enum ("run-mode",
- "run mode",
- "The run mode",
- GIMP_TYPE_RUN_MODE,
- GIMP_RUN_INTERACTIVE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_image_id ("image",
- "image",
- "Input image (unused)",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_procedure_add_argument (procedure,
- gimp_param_spec_drawable_id ("drawable",
- "drawable",
- "Input drawable",
- pdb->gimp, FALSE,
- GIMP_PARAM_READWRITE));
- gimp_pdb_register_procedure (pdb, procedure);
- g_object_unref (procedure);
-
- /*
* gimp-plug-in-vinvert
*/
procedure = gimp_procedure_new (plug_in_vinvert_invoker);
diff --git a/tools/pdbgen/pdb/plug_in_compat.pdb b/tools/pdbgen/pdb/plug_in_compat.pdb
index 4a63d83..9302403 100644
--- a/tools/pdbgen/pdb/plug_in_compat.pdb
+++ b/tools/pdbgen/pdb/plug_in_compat.pdb
@@ -437,6 +437,67 @@ CODE
);
}
+sub plug_in_hsv_noise {
+ $blurb = 'Randomize hue, saturation and value independently';
+
+ $help = <<'HELP';
+Scattering pixel values in HSV space
+HELP
+
+ &std_pdb_compat('gegl:noise-hsv');
+ $date = '2013';
+
+ @inargs = (
+ { name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
+ desc => 'The run mode' },
+ { name => 'image', type => 'image', dead => 1,
+ desc => 'Input image (unused)' },
+ { name => 'drawable', type => 'drawable',
+ desc => 'Input drawable' },
+ { name => 'holdness', type => '1 <= int32 <= 8',
+ desc => 'Convolution strength' },
+ { name => 'hue_distance', type => '0 <= int32 <= 180',
+ desc => 'Scattering of hue angle' },
+ { name => 'saturation_distance', type => '0 <= int32 <= 255',
+ desc => 'Distribution distance on saturation axis' },
+ { name => 'value_distance', type => '0 <= int32 <= 255',
+ desc => 'Distribution distance on value axis' }
+ );
+
+ %invoke = (
+ code => <<'CODE'
+{
+ if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+ GIMP_PDB_ITEM_CONTENT, error) &&
+ gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
+ {
+ GeglNode *node;
+
+ gdouble saturation = saturation_distance / 255.0;
+ gdouble value = value_distance / 255.0;
+
+
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:noise-hsv",
+ "holdness", (gint) holdness,
+ "hue-distance", (gdouble) hue_distance,
+ "saturation-distance", (gdouble) saturation,
+ "value-distance", (gdouble) value,
+ NULL);
+
+ gimp_drawable_apply_operation (drawable, progress,
+ C_("undo-type", "Noise HSV"),
+ node);
+
+ g_object_unref (node);
+ }
+ else
+ success = FALSE;
+}
+CODE
+ );
+}
+
sub plug_in_laplace {
$blurb = 'High-resolution edge detection';
@@ -485,56 +546,39 @@ CODE
);
}
-sub plug_in_hsv_noise {
- $blurb = 'Randomize hue, saturation and value independently';
+sub plug_in_make_seamless {
+ $blurb = 'Alters edges to make the image seamlessly tileable';
$help = <<'HELP';
-Scattering pixel values in HSV space
+This plugin creates a seamless tileable from the input drawable.
HELP
- &std_pdb_compat('gegl:noise-hsv');
+ &std_pdb_compat('gegl:tile-seamless');
$date = '2013';
@inargs = (
- { name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
- desc => 'The run mode' },
- { name => 'image', type => 'image', dead => 1,
- desc => 'Input image (unused)' },
- { name => 'drawable', type => 'drawable',
- desc => 'Input drawable' },
- { name => 'holdness', type => '1 <= int32 <= 8',
- desc => 'Convolution strength' },
- { name => 'hue_distance', type => '0 <= int32 <= 180',
- desc => 'Scattering of hue angle' },
- { name => 'saturation_distance', type => '0 <= int32 <= 255',
- desc => 'Distribution distance on saturation axis' },
- { name => 'value_distance', type => '0 <= int32 <= 255',
- desc => 'Distribution distance on value axis' }
+ { name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
+ desc => 'The run mode' },
+ { name => 'image', type => 'image', dead => 1,
+ desc => 'Input image (unused)' },
+ { name => 'drawable', type => 'drawable',
+ desc => 'Input drawable' }
);
%invoke = (
- code => <<'CODE'
+ code => <<'CODE'
{
if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GeglNode *node;
-
- gdouble saturation = saturation_distance / 255.0;
- gdouble value = value_distance / 255.0;
-
-
- node = gegl_node_new_child (NULL,
- "operation", "gegl:noise-hsv",
- "holdness", (gint) holdness,
- "hue-distance", (gdouble) hue_distance,
- "saturation-distance", (gdouble) saturation,
- "value-distance", (gdouble) value,
- NULL);
+ GeglNode *node =
+ gegl_node_new_child (NULL,
+ "operation", "gegl:tile-seamless",
+ NULL);
gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Noise HSV"),
+ C_("undo-type", "Tile Seamless"),
node);
g_object_unref (node);
@@ -1482,50 +1526,6 @@ CODE
);
}
-sub plug_in_make_seamless {
- $blurb = 'Alters edges to make the image seamlessly tileable';
-
- $help = <<'HELP';
-This plugin creates a seamless tileable from the input drawable.
-HELP
-
- &std_pdb_compat('gegl:tile-seamless');
- $date = '2013';
-
- @inargs = (
- { name => 'run_mode', type => 'enum GimpRunMode', dead => 1,
- desc => 'The run mode' },
- { name => 'image', type => 'image', dead => 1,
- desc => 'Input image (unused)' },
- { name => 'drawable', type => 'drawable',
- desc => 'Input drawable' }
- );
-
- %invoke = (
- code => <<'CODE'
-{
- if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
- GIMP_PDB_ITEM_CONTENT, error) &&
- gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
- {
- GeglNode *node =
- gegl_node_new_child (NULL,
- "operation", "gegl:tile-seamless",
- NULL);
-
- gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Tile Seamless"),
- node);
-
- g_object_unref (node);
- }
- else
- success = FALSE;
-}
-CODE
- );
-}
-
sub plug_in_vinvert {
$blurb = 'Invert the brightness of each pixel';
@@ -1724,8 +1724,9 @@ CODE
plug_in_colors_channel_mixer
plug_in_colortoalpha
plug_in_cubism
- plug_in_laplace
plug_in_hsv_noise
+ plug_in_laplace
+ plug_in_make_seamless
plug_in_mblur
plug_in_mblur_inward
plug_in_mosaic
@@ -1741,7 +1742,6 @@ CODE
plug_in_shift
plug_in_spread
plug_in_threshold_alpha
- plug_in_make_seamless
plug_in_vinvert
plug_in_waves
plug_in_whirl_pinch);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]