[gimp] libgimp: deprecate a bunch of old selection API



commit 47eaecdc9d08ad2282a6db780c0fb62b85bcd69d
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jan 25 19:28:30 2011 +0100

    libgimp: deprecate a bunch of old selection API
    
    namely ellipse_select(), free_select(), rect_select() and
    round_rect_select() because they are fully replaced by the new
    gimp_image_select_foo() functions. Will deprecate the rest as soon as
    I have figured how to put the parameter overkill of the remaining
    functions into context properties.

 app/pdb/image-select-cmds.c          |   10 +++---
 app/pdb/selection-tools-cmds.c       |   42 +++++++++++++-------------
 libgimp/gimpimageselect_pdb.c        |   22 ++++++++++---
 libgimp/gimpselectiontools_pdb.c     |   48 ++++-------------------------
 libgimp/gimpselectiontools_pdb.h     |    4 ++
 plug-ins/common/screenshot.c         |    6 ++--
 plug-ins/gfig/gfig-circle.c          |   16 +++++----
 plug-ins/gfig/gfig-ellipse.c         |   16 +++++----
 plug-ins/gfig/gfig-poly.c            |   14 +++++----
 plug-ins/gfig/gfig-rectangle.c       |   16 +++++----
 plug-ins/gfig/gfig-star.c            |   14 +++++----
 tools/pdbgen/pdb/image_select.pdb    |   19 ++++++++++++
 tools/pdbgen/pdb/selection_tools.pdb |   54 ++-------------------------------
 13 files changed, 123 insertions(+), 158 deletions(-)
---
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 97712c9..0c1cfa5 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -441,7 +441,7 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-ellipse",
                                      "Create an elliptical selection over the specified image.",
-                                     "This tool creates an elliptical selection over the specified image. The elliptical region can be either added to, subtracted from, or replace the contents of the previous selection mask.",
+                                     "This tool creates an elliptical selection over the specified image. The elliptical region can be either added to, subtracted from, or replace the contents of the previous selection mask. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
                                      "Michael Natterer <mitch gimp org>",
                                      "Michael Natterer",
                                      "2010",
@@ -495,7 +495,7 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-polygon",
                                      "Create a polygonal selection over the specified image.",
-                                     "This tool creates a polygonal selection over the specified image. The polygonal region can be either added to, subtracted from, or replace the contents of the previous selection mask. The polygon is specified through an array of floating point numbers and its length. The length of array must be 2n, where n is the number of points. Each point is defined by 2 floating point values which correspond to the x and y coordinates. If the final point does not connect to the starting point, a connecting segment is automatically added.",
+                                     "This tool creates a polygonal selection over the specified image. The polygonal region can be either added to, subtracted from, or replace the contents of the previous selection mask. The polygon is specified through an array of floating point numbers and its length. The length of array must be 2n, where n is the number of points. Each point is defined by 2 floating point values which correspond to the x and y coordinates. If the final point does not connect to the starting point, a connecting segment is automatically added. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
                                      "Michael Natterer <mitch gimp org>",
                                      "Michael Natterer",
                                      "2010",
@@ -610,7 +610,7 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-rectangle",
                                      "Create a rectangular selection over the specified image;",
-                                     "This tool creates a rectangular selection over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask.",
+                                     "This tool creates a rectangular selection over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask. This prodecure is affected by the following context setters: 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
                                      "Michael Natterer <mitch gimp org>",
                                      "Michael Natterer",
                                      "2010",
@@ -664,7 +664,7 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-round-rectangle",
                                      "Create a rectangular selection with round corners over the specified image;",
-                                     "This tool creates a rectangular selection with round corners over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask.",
+                                     "This tool creates a rectangular selection with round corners over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
                                      "Martin Nordholts",
                                      "Martin Nordholts",
                                      "2010",
@@ -730,7 +730,7 @@ register_image_select_procs (GimpPDB *pdb)
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-image-select-item",
                                      "Transforms the specified item into a selection",
-                                     "This procedure renders the item's outline into the current selection of the image the item belongs to. What exactly the item's outline is depends on the item type: for layers, it's the layer's alpha channel, for vectors the vector's shape.",
+                                     "This procedure renders the item's outline into the current selection of the image the item belongs to. What exactly the item's outline is depends on the item type: for layers, it's the layer's alpha channel, for vectors the vector's shape. This prodecure is affected by the following context setters: 'gimp-context-set-antialias', 'gimp-context-set-feather', 'gimp-context-set-feather-radius'.",
                                      "Michael Natterer <mitch gimp org>",
                                      "Michael Natterer",
                                      "2010",
diff --git a/app/pdb/selection-tools-cmds.c b/app/pdb/selection-tools-cmds.c
index 0c55f8d..debae44 100644
--- a/app/pdb/selection-tools-cmds.c
+++ b/app/pdb/selection-tools-cmds.c
@@ -600,12 +600,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-ellipse-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-ellipse-select",
-                                     "Create an elliptical selection over the specified image.",
-                                     "This tool creates an elliptical selection over the specified image. The elliptical region can be either added to, subtracted from, or replace the contents of the previous selection mask. If antialiasing is turned on, the edges of the elliptical region will contain intermediate values which give the appearance of a sharper, less pixelized edge. This should be set as TRUE most of the time. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "1995-1996",
-                                     NULL);
+                                     "Deprecated: Use 'gimp-image-select-ellipse' instead.",
+                                     "Deprecated: Use 'gimp-image-select-ellipse' instead.",
+                                     "",
+                                     "",
+                                     "",
+                                     "gimp-image-select-ellipse");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_image_id ("image",
                                                          "image",
@@ -672,12 +672,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-free-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-free-select",
-                                     "Create a polygonal selection over the specified image.",
-                                     "This tool creates a polygonal selection over the specified image. The polygonal region can be either added to, subtracted from, or replace the contents of the previous selection mask. The polygon is specified through an array of floating point numbers and its length. The length of array must be 2n, where n is the number of points. Each point is defined by 2 floating point values which correspond to the x and y coordinates. If the final point does not connect to the starting point, a connecting segment is automatically added. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "1995-1996",
-                                     NULL);
+                                     "Deprecated: Use 'gimp-image-select-polygon' instead.",
+                                     "Deprecated: Use 'gimp-image-select-polygon' instead.",
+                                     "",
+                                     "",
+                                     "",
+                                     "gimp-image-select-polygon");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_image_id ("image",
                                                          "image",
@@ -896,12 +896,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-rect-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-rect-select",
-                                     "Create a rectangular selection over the specified image;",
-                                     "This tool creates a rectangular selection over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "Spencer Kimball & Peter Mattis",
-                                     "1995-1996",
-                                     NULL);
+                                     "Deprecated: Use 'gimp-image-select-rectangle' instead.",
+                                     "Deprecated: Use 'gimp-image-select-rectangle' instead.",
+                                     "",
+                                     "",
+                                     "",
+                                     "gimp-image-select-rectangle");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_image_id ("image",
                                                          "image",
@@ -962,12 +962,12 @@ register_selection_tools_procs (GimpPDB *pdb)
                                "gimp-round-rect-select");
   gimp_procedure_set_static_strings (procedure,
                                      "gimp-round-rect-select",
-                                     "Create a rectangular selection with round corners over the specified image;",
-                                     "This tool creates a rectangular selection with round corners over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.",
+                                     "Deprecated: Use 'gimp-image-select-round-rectangle' instead.",
+                                     "Deprecated: Use 'gimp-image-select-round-rectangle' instead.",
                                      "Martin Nordholts",
                                      "Martin Nordholts",
                                      "2006",
-                                     NULL);
+                                     "gimp-image-select-round-rectangle");
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_image_id ("image",
                                                          "image",
diff --git a/libgimp/gimpimageselect_pdb.c b/libgimp/gimpimageselect_pdb.c
index d76a4fa..edf5520 100644
--- a/libgimp/gimpimageselect_pdb.c
+++ b/libgimp/gimpimageselect_pdb.c
@@ -110,7 +110,10 @@ gimp_image_select_color (gint32               image_ID,
  *
  * This tool creates an elliptical selection over the specified image.
  * The elliptical region can be either added to, subtracted from, or
- * replace the contents of the previous selection mask.
+ * replace the contents of the previous selection mask. This prodecure
+ * is affected by the following context setters:
+ * gimp_context_set_antialias(), gimp_context_set_feather(),
+ * gimp_context_set_feather_radius().
  *
  * Returns: TRUE on success.
  *
@@ -161,7 +164,10 @@ gimp_image_select_ellipse (gint32         image_ID,
  * The length of array must be 2n, where n is the number of points.
  * Each point is defined by 2 floating point values which correspond to
  * the x and y coordinates. If the final point does not connect to the
- * starting point, a connecting segment is automatically added.
+ * starting point, a connecting segment is automatically added. This
+ * prodecure is affected by the following context setters:
+ * gimp_context_set_antialias(), gimp_context_set_feather(),
+ * gimp_context_set_feather_radius().
  *
  * Returns: TRUE on success.
  *
@@ -276,7 +282,9 @@ gimp_image_select_fuzzy (gint32              image_ID,
  *
  * This tool creates a rectangular selection over the specified image.
  * The rectangular region can be either added to, subtracted from, or
- * replace the contents of the previous selection mask.
+ * replace the contents of the previous selection mask. This prodecure
+ * is affected by the following context setters:
+ * gimp_context_set_feather(), gimp_context_set_feather_radius().
  *
  * Returns: TRUE on success.
  *
@@ -328,7 +336,9 @@ gimp_image_select_rectangle (gint32         image_ID,
  * This tool creates a rectangular selection with round corners over
  * the specified image. The rectangular region can be either added to,
  * subtracted from, or replace the contents of the previous selection
- * mask.
+ * mask. This prodecure is affected by the following context setters:
+ * gimp_context_set_antialias(), gimp_context_set_feather(),
+ * gimp_context_set_feather_radius().
  *
  * Returns: TRUE on success.
  *
@@ -378,7 +388,9 @@ gimp_image_select_round_rectangle (gint32         image_ID,
  * This procedure renders the item's outline into the current selection
  * of the image the item belongs to. What exactly the item's outline is
  * depends on the item type: for layers, it's the layer's alpha
- * channel, for vectors the vector's shape.
+ * channel, for vectors the vector's shape. This prodecure is affected
+ * by the following context setters: gimp_context_set_antialias(),
+ * gimp_context_set_feather(), gimp_context_set_feather_radius().
  *
  * Returns: TRUE on success.
  *
diff --git a/libgimp/gimpselectiontools_pdb.c b/libgimp/gimpselectiontools_pdb.c
index 3b1e74b..4ba9d0b 100644
--- a/libgimp/gimpselectiontools_pdb.c
+++ b/libgimp/gimpselectiontools_pdb.c
@@ -23,6 +23,9 @@
 #include "config.h"
 
 #include "gimp.h"
+#undef GIMP_DISABLE_DEPRECATED
+#undef __GIMP_SELECTION_TOOLS_PDB_H__
+#include "gimpselectiontools_pdb.h"
 
 
 /**
@@ -184,17 +187,7 @@ gimp_by_color_select_full (gint32               drawable_ID,
  * @feather: Feather option for selections.
  * @feather_radius: Radius for feather operation.
  *
- * Create an elliptical selection over the specified image.
- *
- * This tool creates an elliptical selection over the specified image.
- * The elliptical region can be either added to, subtracted from, or
- * replace the contents of the previous selection mask. If antialiasing
- * is turned on, the edges of the elliptical region will contain
- * intermediate values which give the appearance of a sharper, less
- * pixelized edge. This should be set as TRUE most of the time. If the
- * feather option is enabled, the resulting selection is blurred before
- * combining. The blur is a gaussian blur with the specified feather
- * radius.
+ * Deprecated: Use gimp_image_select_ellipse() instead.
  *
  * Returns: TRUE on success.
  **/
@@ -243,19 +236,7 @@ gimp_ellipse_select (gint32         image_ID,
  * @feather: Feather option for selections.
  * @feather_radius: Radius for feather operation.
  *
- * Create a polygonal selection over the specified image.
- *
- * This tool creates a polygonal selection over the specified image.
- * The polygonal region can be either added to, subtracted from, or
- * replace the contents of the previous selection mask. The polygon is
- * specified through an array of floating point numbers and its length.
- * The length of array must be 2n, where n is the number of points.
- * Each point is defined by 2 floating point values which correspond to
- * the x and y coordinates. If the final point does not connect to the
- * starting point, a connecting segment is automatically added. If the
- * feather option is enabled, the resulting selection is blurred before
- * combining. The blur is a gaussian blur with the specified feather
- * radius.
+ * Deprecated: Use gimp_image_select_polygon() instead.
  *
  * Returns: TRUE on success.
  **/
@@ -454,14 +435,7 @@ gimp_fuzzy_select_full (gint32              drawable_ID,
  * @feather: Feather option for selections.
  * @feather_radius: Radius for feather operation.
  *
- * Create a rectangular selection over the specified image;
- *
- * This tool creates a rectangular selection over the specified image.
- * The rectangular region can be either added to, subtracted from, or
- * replace the contents of the previous selection mask. If the feather
- * option is enabled, the resulting selection is blurred before
- * combining. The blur is a gaussian blur with the specified feather
- * radius.
+ * Deprecated: Use gimp_image_select_rectangle() instead.
  *
  * Returns: TRUE on success.
  **/
@@ -513,15 +487,7 @@ gimp_rect_select (gint32         image_ID,
  * @feather_radius_x: Radius for feather operation in X direction.
  * @feather_radius_y: Radius for feather operation in Y direction.
  *
- * Create a rectangular selection with round corners over the specified
- * image;
- *
- * This tool creates a rectangular selection with round corners over
- * the specified image. The rectangular region can be either added to,
- * subtracted from, or replace the contents of the previous selection
- * mask. If the feather option is enabled, the resulting selection is
- * blurred before combining. The blur is a gaussian blur with the
- * specified feather radius.
+ * Deprecated: Use gimp_image_select_round_rectangle() instead.
  *
  * Returns: TRUE on success.
  *
diff --git a/libgimp/gimpselectiontools_pdb.h b/libgimp/gimpselectiontools_pdb.h
index 79b1c06..54b1ca2 100644
--- a/libgimp/gimpselectiontools_pdb.h
+++ b/libgimp/gimpselectiontools_pdb.h
@@ -47,6 +47,7 @@ gboolean gimp_by_color_select_full (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean gimp_ellipse_select       (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -63,6 +64,7 @@ gboolean gimp_free_select          (gint32               image_ID,
                                     gboolean             antialias,
                                     gboolean             feather,
                                     gdouble              feather_radius);
+#endif /* GIMP_DISABLE_DEPRECATED */
 gboolean gimp_fuzzy_select         (gint32               drawable_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -84,6 +86,7 @@ gboolean gimp_fuzzy_select_full    (gint32               drawable_ID,
                                     gboolean             sample_merged,
                                     gboolean             select_transparent,
                                     GimpSelectCriterion  select_criterion);
+#ifndef GIMP_DISABLE_DEPRECATED
 gboolean gimp_rect_select          (gint32               image_ID,
                                     gdouble              x,
                                     gdouble              y,
@@ -104,6 +107,7 @@ gboolean gimp_round_rect_select    (gint32               image_ID,
                                     gboolean             feather,
                                     gdouble              feather_radius_x,
                                     gdouble              feather_radius_y);
+#endif /* GIMP_DISABLE_DEPRECATED */
 
 
 G_END_DECLS
diff --git a/plug-ins/common/screenshot.c b/plug-ins/common/screenshot.c
index 258f7dc..f067df6 100644
--- a/plug-ins/common/screenshot.c
+++ b/plug-ins/common/screenshot.c
@@ -749,9 +749,9 @@ image_select_shape (gint32     image,
 
   for (i = 0; i < num_rects; i++)
     {
-      gimp_rect_select (image,
-                        rects[i].x, rects[i].y, rects[i].width, rects[i].height,
-                        GIMP_CHANNEL_OP_ADD, FALSE, 0);
+      gimp_image_select_rectangle (image, GIMP_CHANNEL_OP_ADD,
+                                   rects[i].x, rects[i].y,
+                                   rects[i].width, rects[i].height);
     }
 
   g_free (rects);
diff --git a/plug-ins/gfig/gfig-circle.c b/plug-ins/gfig/gfig-circle.c
index 951eb6b..c680d36 100644
--- a/plug-ins/gfig/gfig-circle.c
+++ b/plug-ins/gfig/gfig-circle.c
@@ -116,13 +116,15 @@ d_paint_circle (GfigObject *obj)
   else
     scale_to_xy (&dpnts[0], 2);
 
-  gimp_ellipse_select (gfig_context->image_id,
-                       dpnts[0], dpnts[1],
-                       dpnts[2], dpnts[3],
-                       selopt.type,
-                       selopt.antia,
-                       selopt.feather,
-                       selopt.feather_radius);
+  gimp_context_push ();
+  gimp_context_set_antialias (selopt.antia);
+  gimp_context_set_feather (selopt.feather);
+  gimp_context_set_feather_radius (selopt.feather_radius, selopt.feather_radius);
+  gimp_image_select_ellipse (gfig_context->image_id,
+                             selopt.type,
+                             dpnts[0], dpnts[1],
+                             dpnts[2], dpnts[3]);
+  gimp_context_pop ();
 
   paint_layer_fill (center_pnt->pnt.x - radius,
                     center_pnt->pnt.y - radius,
diff --git a/plug-ins/gfig/gfig-ellipse.c b/plug-ins/gfig/gfig-ellipse.c
index b6e3fb3..41e2af5 100644
--- a/plug-ins/gfig/gfig-ellipse.c
+++ b/plug-ins/gfig/gfig-ellipse.c
@@ -137,13 +137,15 @@ d_paint_ellipse (GfigObject *obj)
   else
     scale_to_xy (&dpnts[0], 2);
 
-  gimp_ellipse_select (gfig_context->image_id,
-                       dpnts[0], dpnts[1],
-                       dpnts[2], dpnts[3],
-                       selopt.type,
-                       selopt.antia,
-                       selopt.feather,
-                       selopt.feather_radius);
+  gimp_context_push ();
+  gimp_context_set_antialias (selopt.antia);
+  gimp_context_set_feather (selopt.feather);
+  gimp_context_set_feather_radius (selopt.feather_radius, selopt.feather_radius);
+  gimp_image_select_ellipse (gfig_context->image_id,
+                             selopt.type,
+                             dpnts[0], dpnts[1],
+                             dpnts[2], dpnts[3]);
+  gimp_context_pop ();
 
   paint_layer_fill (top_x, top_y, top_x + bound_wx, top_y + bound_wy);
 
diff --git a/plug-ins/gfig/gfig-poly.c b/plug-ins/gfig/gfig-poly.c
index 049eba0..2db2905 100644
--- a/plug-ins/gfig/gfig-poly.c
+++ b/plug-ins/gfig/gfig-poly.c
@@ -243,12 +243,14 @@ d_paint_poly (GfigObject *obj)
     }
 
 
-  gimp_free_select (gfig_context->image_id,
-                    i, line_pnts,
-                    selopt.type,
-                    selopt.antia,
-                    selopt.feather,
-                    selopt.feather_radius);
+  gimp_context_push ();
+  gimp_context_set_antialias (selopt.antia);
+  gimp_context_set_feather (selopt.feather);
+  gimp_context_set_feather_radius (selopt.feather_radius, selopt.feather_radius);
+  gimp_image_select_polygon (gfig_context->image_id,
+                             selopt.type,
+                             i, line_pnts);
+  gimp_context_pop ();
 
   paint_layer_fill (min_max[0], min_max[1], min_max[2], min_max[3]);
 
diff --git a/plug-ins/gfig/gfig-rectangle.c b/plug-ins/gfig/gfig-rectangle.c
index 9bcda7a..17a5fe9 100644
--- a/plug-ins/gfig/gfig-rectangle.c
+++ b/plug-ins/gfig/gfig-rectangle.c
@@ -132,13 +132,15 @@ d_paint_rectangle (GfigObject *obj)
   else
     scale_to_xy (&dpnts[0], 2);
 
-  gimp_rect_select (gfig_context->image_id,
-                    dpnts[0], dpnts[1],
-                    dpnts[2] - dpnts[0],
-                    dpnts[3] - dpnts[1],
-                    selopt.type,
-                    selopt.feather,
-                    selopt.feather_radius);
+  gimp_context_push ();
+  gimp_context_set_feather (selopt.feather);
+  gimp_context_set_feather_radius (selopt.feather_radius, selopt.feather_radius);
+  gimp_image_select_rectangle (gfig_context->image_id,
+                               selopt.type,
+                               dpnts[0], dpnts[1],
+                               dpnts[2] - dpnts[0],
+                               dpnts[3] - dpnts[1]);
+  gimp_context_pop ();
 
   paint_layer_fill (dpnts[0], dpnts[1], dpnts[2], dpnts[3]);
 
diff --git a/plug-ins/gfig/gfig-star.c b/plug-ins/gfig/gfig-star.c
index 5922b85..ca37372 100644
--- a/plug-ins/gfig/gfig-star.c
+++ b/plug-ins/gfig/gfig-star.c
@@ -305,12 +305,14 @@ d_paint_star (GfigObject *obj)
       scale_to_xy (min_max, 2);
     }
 
-  gimp_free_select (gfig_context->image_id,
-                    i, line_pnts,
-                    selopt.type,
-                    selopt.antia,
-                    selopt.feather,
-                    selopt.feather_radius);
+  gimp_context_push ();
+  gimp_context_set_antialias (selopt.antia);
+  gimp_context_set_feather (selopt.feather);
+  gimp_context_set_feather_radius (selopt.feather_radius, selopt.feather_radius);
+  gimp_image_select_polygon (gfig_context->image_id,
+                             selopt.type,
+                             i, line_pnts);
+  gimp_context_pop ();
 
   paint_layer_fill (min_max[0], min_max[1], min_max[2], min_max[3]);
 
diff --git a/tools/pdbgen/pdb/image_select.pdb b/tools/pdbgen/pdb/image_select.pdb
index 559396d..96949a0 100644
--- a/tools/pdbgen/pdb/image_select.pdb
+++ b/tools/pdbgen/pdb/image_select.pdb
@@ -96,6 +96,10 @@ sub image_select_ellipse {
 This tool creates an elliptical selection over the specified
 image. The elliptical region can be either added to, subtracted from,
 or replace the contents of the previous selection mask.
+
+This prodecure is affected by the following context setters:
+gimp_context_set_antialias(), gimp_context_set_feather(),
+gimp_context_set_feather_radius().
 HELP
 
     &mitch_pdb_misc('2010', '2.8');
@@ -147,6 +151,10 @@ of array must be 2n, where n is the number of points. Each point is
 defined by 2 floating point values which correspond to the x and y
 coordinates. If the final point does not connect to the starting
 point, a connecting segment is automatically added.
+
+This prodecure is affected by the following context setters:
+gimp_context_set_antialias(), gimp_context_set_feather(),
+gimp_context_set_feather_radius().
 HELP
 
     &mitch_pdb_misc('2010', '2.8');
@@ -275,6 +283,9 @@ sub image_select_rectangle {
 This tool creates a rectangular selection over the specified
 image. The rectangular region can be either added to, subtracted from,
 or replace the contents of the previous selection mask.
+
+This prodecure is affected by the following context setters:
+gimp_context_set_feather(), gimp_context_set_feather_radius().
 HELP
 
     &mitch_pdb_misc('2010', '2.8');
@@ -321,6 +332,10 @@ This tool creates a rectangular selection with round corners over the
 specified image. The rectangular region can be either added to,
 subtracted from, or replace the contents of the previous selection
 mask.
+
+This prodecure is affected by the following context setters:
+gimp_context_set_antialias(), gimp_context_set_feather(),
+gimp_context_set_feather_radius().
 HELP
 
     &martin_pdb_misc('2010', '2.8');
@@ -374,6 +389,10 @@ This procedure renders the item's outline into the current selection
 of the image the item belongs to. What exactly the item's outline is
 depends on the item type: for layers, it's the layer's alpha channel,
 for vectors the vector's shape.
+
+This prodecure is affected by the following context setters:
+gimp_context_set_antialias(), gimp_context_set_feather(),
+gimp_context_set_feather_radius().
 HELP
 
     &mitch_pdb_misc('2010', '2.8');
diff --git a/tools/pdbgen/pdb/selection_tools.pdb b/tools/pdbgen/pdb/selection_tools.pdb
index 8d7356c..b72d645 100644
--- a/tools/pdbgen/pdb/selection_tools.pdb
+++ b/tools/pdbgen/pdb/selection_tools.pdb
@@ -154,20 +154,7 @@ CODE
 
 
 sub ellipse_select {
-    $blurb = 'Create an elliptical selection over the specified image.';
-
-    $help = <<'HELP';
-This tool creates an elliptical selection over the specified image. The
-elliptical region can be either added to, subtracted from, or replace the
-contents of the previous selection mask. If antialiasing is turned on, the
-edges of the elliptical region will contain intermediate values which give the
-appearance of a sharper, less pixelized edge. This should be set as TRUE most
-of the time. If the feather option is enabled, the resulting selection is
-blurred before combining. The blur is a gaussian blur with the specified
-feather radius.
-HELP
-
-    &std_pdb_misc;
+    &std_pdb_deprecated ('gimp-image-select-ellipse');
 
     @inargs = (
 	{ name => 'image', type => 'image',
@@ -209,21 +196,7 @@ CODE
 
 
 sub free_select {
-    $blurb = 'Create a polygonal selection over the specified image.';
-
-    $help = <<'HELP';
-This tool creates a polygonal selection over the specified image. The polygonal
-region can be either added to, subtracted from, or replace the contents of the
-previous selection mask. The polygon is specified through an array of floating
-point numbers and its length. The length of array must be 2n, where n is the
-number of points. Each point is defined by 2 floating point values which
-correspond to the x and y coordinates. If the final point does not connect to
-the starting point, a connecting segment is automatically added. If the feather
-option is enabled, the resulting selection is blurred before combining. The
-blur is a gaussian blur with the specified feather radius.
-HELP
-
-    &std_pdb_misc;
+    &std_pdb_deprecated ('gimp-image-select-polygon');
 
     @inargs = (
 	{ name => 'image', type => 'image',
@@ -418,17 +391,7 @@ CODE
 
 
 sub rect_select {
-    $blurb = 'Create a rectangular selection over the specified image;';
-
-    $help = <<'HELP';
-This tool creates a rectangular selection over the specified image. The
-rectangular region can be either added to, subtracted from, or replace the
-contents of the previous selection mask. If the feather option is enabled, the
-resulting selection is blurred before combining. The blur is a gaussian blur
-with the specified feather radius.
-HELP
-
-    &std_pdb_misc;
+    &std_pdb_deprecated ('gimp-image-select-rectangle');
 
     @inargs = (
 	{ name => 'image', type => 'image',
@@ -467,16 +430,7 @@ CODE
 
 
 sub round_rect_select {
-    $blurb = 'Create a rectangular selection with round corners over the specified image;';
-
-    $help = <<'HELP';
-This tool creates a rectangular selection with round corners over the
-specified image. The rectangular region can be either added to,
-subtracted from, or replace the contents of the previous selection
-mask. If the feather option is enabled, the resulting selection is
-blurred before combining. The blur is a gaussian blur with the
-specified feather radius.
-HELP
+    &std_pdb_deprecated ('gimp-image-select-round-rectangle');
 
     &martin_pdb_misc("2006","2.4");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]