From 51ac9d7f2a2025189926c1bd8957992dc4c1acf1 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 1 Mar 2026 21:48:13 +0100 Subject: [PATCH] =?UTF-8?q?Issue=20#15681:=20deprecate=20gimp=5Fdrawable?= =?UTF-8?q?=5Fcurves=5Fexplicit()=20and=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … gimp_drawable_curves_spline(). We can now run directly "gimp:curves" operation, both destructively or non-destructively, but also setting the TRC, as well as individual point types (when the curve is of type "smooth" instead of freehand). This is much more powerful! --- app/pdb/drawable-color-cmds.c | 12 ++++++++++-- libgimp/gimpdrawablecolor_pdb.c | 4 ++++ libgimp/gimpdrawablecolor_pdb.h | 2 ++ pdb/groups/drawable_color.pdb | 6 ++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/app/pdb/drawable-color-cmds.c b/app/pdb/drawable-color-cmds.c index 76a29f9afb..b44ef6606c 100644 --- a/app/pdb/drawable-color-cmds.c +++ b/app/pdb/drawable-color-cmds.c @@ -987,12 +987,16 @@ register_drawable_color_procs (GimpPDB *pdb) "gimp-drawable-curves-explicit"); gimp_procedure_set_static_help (procedure, "Modifies the intensity curve(s) for specified drawable.", - "Modifies the intensity mapping for one channel in the specified drawable. The channel can be either an intensity component, or the value. The 'values' parameter is an array of doubles which explicitly defines how each pixel value in the drawable will be modified. Use the 'gimp-drawable-curves-spline' function to modify intensity levels with Catmull Rom splines.", + "Modifies the intensity mapping for one channel in the specified drawable. The channel can be either an intensity component, or the value. The 'values' parameter is an array of doubles which explicitly defines how each pixel value in the drawable will be modified. Use the 'gimp-drawable-curves-spline' function to modify intensity levels with Catmull Rom splines.\n" + "\n" + "Deprecated: Use filter \"gimp:curves\" instead.", NULL); gimp_procedure_set_static_attribution (procedure, "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996"); + gimp_procedure_set_deprecated (procedure, + "gimp:curves"); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable ("drawable", "drawable", @@ -1026,12 +1030,16 @@ register_drawable_color_procs (GimpPDB *pdb) "\n" "The @points parameter is an array of doubles in the range `[0, 1]` which define a set of control points which describe a Catmull Rom spline which yields the final intensity curve. Since every point has 2 coordinates, the size of @points (@num_coordinates) must be a multiple of 2, equal or bigger than 4 (i.e. a minimum of 2 points).\n" "\n" - "Use [method@Gimp.Drawable.curves_explicit] to explicitly modify intensity levels.", + "Use [method@Gimp.Drawable.curves_explicit] to explicitly modify intensity levels.\n" + "\n" + "Deprecated: Use filter \"gimp:curves\" instead.", NULL); gimp_procedure_set_static_attribution (procedure, "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996"); + gimp_procedure_set_deprecated (procedure, + "gimp:curves"); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable ("drawable", "drawable", diff --git a/libgimp/gimpdrawablecolor_pdb.c b/libgimp/gimpdrawablecolor_pdb.c index 5afd369708..38873d776a 100644 --- a/libgimp/gimpdrawablecolor_pdb.c +++ b/libgimp/gimpdrawablecolor_pdb.c @@ -206,6 +206,8 @@ gimp_drawable_colorize_hsl (GimpDrawable *drawable, * modified. Use the gimp_drawable_curves_spline() function to modify * intensity levels with Catmull Rom splines. * + * Deprecated: 3.2: Use filter "gimp:curves" instead. + * * Returns: TRUE on success. * * Since: 2.10 @@ -264,6 +266,8 @@ gimp_drawable_curves_explicit (GimpDrawable *drawable, * Use [method@Gimp.Drawable.curves_explicit] to explicitly modify * intensity levels. * + * Deprecated: 3.2: Use filter "gimp:curves" instead. + * * Returns: TRUE on success. * * Since: 2.10 diff --git a/libgimp/gimpdrawablecolor_pdb.h b/libgimp/gimpdrawablecolor_pdb.h index 501690734c..d110e6fe33 100644 --- a/libgimp/gimpdrawablecolor_pdb.h +++ b/libgimp/gimpdrawablecolor_pdb.h @@ -48,10 +48,12 @@ gboolean gimp_drawable_colorize_hsl (GimpDrawable *drawable, gdouble hue, gdouble saturation, gdouble lightness); +GIMP_DEPRECATED_FOR(gimp:curves) gboolean gimp_drawable_curves_explicit (GimpDrawable *drawable, GimpHistogramChannel channel, gsize num_values, const gdouble *values); +GIMP_DEPRECATED_FOR(gimp:curves) gboolean gimp_drawable_curves_spline (GimpDrawable *drawable, GimpHistogramChannel channel, gsize num_coordinates, diff --git a/pdb/groups/drawable_color.pdb b/pdb/groups/drawable_color.pdb index 1d1040ca59..f9806da193 100644 --- a/pdb/groups/drawable_color.pdb +++ b/pdb/groups/drawable_color.pdb @@ -201,6 +201,9 @@ HELP &std_pdb_misc; $since = '2.10'; + $deprecated = 'gimp:curves'; + $deprecated_since = '3.2'; + @inargs = ( { name => 'drawable', type => 'drawable', desc => 'The drawable' }, @@ -266,6 +269,9 @@ HELP &std_pdb_misc; $since = '2.10'; + $deprecated = 'gimp:curves'; + $deprecated_since = '3.2'; + @inargs = ( { name => 'drawable', type => 'drawable', desc => 'The drawable' },