Commit aa667f79 authored by Michael Natterer's avatar Michael Natterer 😴

app: rename gimp_image_select_fuzzy() to gimp_image_select_contiguous_color()

and update all documentation accordingly. Also reorder the
gimp_image_select procedures.
parent d650117d
......@@ -1789,7 +1789,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-antialias",
"Set the antialias setting.",
"This procedure modifies the antialias setting. If antialiasing is turned on, the edges of selected 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 unless a binary-only selection is wanted. This settings affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-fuzzy', 'gimp-image-select-round-rectangle', 'gimp-image-select-item'.",
"This procedure modifies the antialias setting. If antialiasing is turned on, the edges of selected 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 unless a binary-only selection is wanted. This settings affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-image-select-round-rectangle', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-item'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010",
......@@ -1835,7 +1835,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-feather",
"Set the feather setting.",
"This procedure modifies the feather setting. If the feather option is enabled, selections will be blurred before combining. The blur is a gaussian blur; its radii can be controlled using 'gimp-context-set-feather-radius'. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-fuzzy', 'gimp-image-select-rectangle', 'gimp-image-select-round-rectangle', 'gimp-image-select-item'.",
"This procedure modifies the feather setting. If the feather option is enabled, selections will be blurred before combining. The blur is a gaussian blur; its radii can be controlled using 'gimp-context-set-feather-radius'. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-image-select-rectangle', 'gimp-image-select-round-rectangle', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-item'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010",
......@@ -1939,7 +1939,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-sample-merged",
"Set the sample merged setting.",
"This procedure modifies the sample merged setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether the pixel data from the specified drawable is used ('sample-merged' is FALSE), or the pixel data from the composite image ('sample-merged' is TRUE. This is equivalent to sampling for colors after merging all visible layers). This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-fuzzy'.",
"This procedure modifies the sample merged setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether the pixel data from the specified drawable is used ('sample-merged' is FALSE), or the pixel data from the composite image ('sample-merged' is TRUE. This is equivalent to sampling for colors after merging all visible layers). This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011",
......@@ -1986,7 +1986,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-sample-criterion",
"Set the sample criterion setting.",
"This procedure modifies the sample criterion setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls how color similarity is determined. SELECT_CRITERION_COMPOSITE is the default value. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-fuzzy'.",
"This procedure modifies the sample criterion setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls how color similarity is determined. SELECT_CRITERION_COMPOSITE is the default value. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011",
......@@ -2033,7 +2033,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-sample-threshold",
"Set the sample threshold setting.",
"This procedure modifies the sample threshold setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls what is \"sufficiently close\" to be considered a similar color. If the sample threshold has not been set explicitly, the default threshold set in gimprc will be used. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-fuzzy'.",
"This procedure modifies the sample threshold setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls what is \"sufficiently close\" to be considered a similar color. If the sample threshold has not been set explicitly, the default threshold set in gimprc will be used. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011",
......@@ -2125,7 +2125,7 @@ register_context_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-sample-transparent",
"Set the sample transparent setting.",
"This procedure modifies the sample transparent setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether transparency is considered to be a unique selectable color. When this setting is TRUE, transparent areas can be selected or filled. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-fuzzy'.",
"This procedure modifies the sample transparent setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether transparency is considered to be a unique selectable color. When this setting is TRUE, transparent areas can be selected or filled. This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color'.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011",
......
This diff is collapsed.
......@@ -731,12 +731,12 @@ register_selection_tools_procs (GimpPDB *pdb)
"gimp-fuzzy-select");
gimp_procedure_set_static_strings (procedure,
"gimp-fuzzy-select",
"Deprecated: Use 'gimp-image-select-fuzzy' instead.",
"Deprecated: Use 'gimp-image-select-fuzzy' instead.",
"Deprecated: Use 'gimp-image-select-contiguous-color' instead.",
"Deprecated: Use 'gimp-image-select-contiguous-color' instead.",
"",
"",
"",
"gimp-image-select-fuzzy");
"gimp-image-select-contiguous-color");
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"drawable",
......@@ -803,12 +803,12 @@ register_selection_tools_procs (GimpPDB *pdb)
"gimp-fuzzy-select-full");
gimp_procedure_set_static_strings (procedure,
"gimp-fuzzy-select-full",
"Deprecated: Use 'gimp-image-select-fuzzy' instead.",
"Deprecated: Use 'gimp-image-select-fuzzy' instead.",
"Deprecated: Use 'gimp-image-select-contiguous-color' instead.",
"Deprecated: Use 'gimp-image-select-contiguous-color' instead.",
"David Gowers",
"David Gowers",
"2006",
"gimp-image-select-fuzzy");
"gimp-image-select-contiguous-color");
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"drawable",
......
......@@ -418,8 +418,8 @@ EXPORTS
gimp_image_scale
gimp_image_scale_full
gimp_image_select_color
gimp_image_select_contiguous_color
gimp_image_select_ellipse
gimp_image_select_fuzzy
gimp_image_select_item
gimp_image_select_polygon
gimp_image_select_rectangle
......
......@@ -907,9 +907,9 @@ gimp_context_get_antialias (void)
* values which give the appearance of a sharper, less pixelized edge.
* This should be set as TRUE most of the time unless a binary-only
* selection is wanted. This settings affects the following procedures:
* gimp_image_select_color(), gimp_image_select_ellipse(),
* gimp_image_select_polygon(), gimp_image_select_fuzzy(),
* gimp_image_select_round_rectangle(), gimp_image_select_item().
* gimp_image_select_color(), gimp_image_select_contiguous_color(),
* gimp_image_select_round_rectangle(), gimp_image_select_ellipse(),
* gimp_image_select_polygon(), gimp_image_select_item().
*
* Returns: TRUE on success.
*
......@@ -975,9 +975,9 @@ gimp_context_get_feather (void)
* a gaussian blur; its radii can be controlled using
* gimp_context_set_feather_radius(). This setting affects the
* following procedures: gimp_image_select_color(),
* gimp_image_select_ellipse(), gimp_image_select_polygon(),
* gimp_image_select_fuzzy(), gimp_image_select_rectangle(),
* gimp_image_select_round_rectangle(), gimp_image_select_item().
* gimp_image_select_contiguous_color(), gimp_image_select_rectangle(),
* gimp_image_select_round_rectangle(), gimp_image_select_ellipse(),
* gimp_image_select_polygon(), gimp_image_select_item().
*
* Returns: TRUE on success.
*
......@@ -1122,7 +1122,7 @@ gimp_context_get_sample_merged (void)
* pixel data from the composite image ('sample-merged' is TRUE. This
* is equivalent to sampling for colors after merging all visible
* layers). This setting affects the following procedures:
* gimp_image_select_color(), gimp_image_select_fuzzy().
* gimp_image_select_color(), gimp_image_select_contiguous_color().
*
* Returns: TRUE on success.
*
......@@ -1188,7 +1188,7 @@ gimp_context_get_sample_criterion (void)
* like when doing a seed fill, this setting controls how color
* similarity is determined. SELECT_CRITERION_COMPOSITE is the default
* value. This setting affects the following procedures:
* gimp_image_select_color(), gimp_image_select_fuzzy().
* gimp_image_select_color(), gimp_image_select_contiguous_color().
*
* Returns: TRUE on success.
*
......@@ -1255,7 +1255,8 @@ gimp_context_get_sample_threshold (void)
* \"sufficiently close\" to be considered a similar color. If the
* sample threshold has not been set explicitly, the default threshold
* set in gimprc will be used. This setting affects the following
* procedures: gimp_image_select_color(), gimp_image_select_fuzzy().
* procedures: gimp_image_select_color(),
* gimp_image_select_contiguous_color().
*
* Returns: TRUE on success.
*
......@@ -1385,7 +1386,7 @@ gimp_context_get_sample_transparent (void)
* transparency is considered to be a unique selectable color. When
* this setting is TRUE, transparent areas can be selected or filled.
* This setting affects the following procedures:
* gimp_image_select_color(), gimp_image_select_fuzzy().
* gimp_image_select_color(), gimp_image_select_contiguous_color().
*
* Returns: TRUE on success.
*
......
......@@ -89,121 +89,21 @@ gimp_image_select_color (gint32 image_ID,
}
/**
* gimp_image_select_ellipse:
* @image_ID: The image.
* @operation: The selection operation.
* @x: x coordinate of upper-left corner of ellipse bounding box.
* @y: y coordinate of upper-left corner of ellipse bounding box.
* @width: The width of the ellipse.
* @height: The height of the 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 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.
*
* Since: GIMP 2.8
**/
gboolean
gimp_image_select_ellipse (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-select-ellipse",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, operation,
GIMP_PDB_FLOAT, x,
GIMP_PDB_FLOAT, y,
GIMP_PDB_FLOAT, width,
GIMP_PDB_FLOAT, height,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_select_polygon:
* @image_ID: The image.
* @operation: The selection operation.
* @num_segs: Number of points (count 1 coordinate as two points).
* @segs: Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.
*
* 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
* 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.
*
* Since: GIMP 2.8
**/
gboolean
gimp_image_select_polygon (gint32 image_ID,
GimpChannelOps operation,
gint num_segs,
const gdouble *segs)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-select-polygon",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, operation,
GIMP_PDB_INT32, num_segs,
GIMP_PDB_FLOATARRAY, segs,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_select_fuzzy:
* gimp_image_select_contiguous_color:
* @image_ID: The affected image.
* @operation: The selection operation.
* @drawable_ID: The affected drawable.
* @x: x coordinate of initial seed fill point: (image coordinates).
* @y: y coordinate of initial seed fill point: (image coordinates).
*
* Create a fuzzy selection starting at the specified coordinates on
* the specified drawable.
* Create a selection by selecting all pixels around specified
* coordinates with the same (or similar) color to that at the
* coordinates.
*
* This tool creates a fuzzy selection over the specified image. A
* fuzzy selection is determined by a seed fill under the constraints
* of the current context settings. Essentially, the color at the
* specified coordinates (in the drawable) is measured and the
* This tool creates a contiguous selection over the specified image. A
* contiguous color selection is determined by a seed fill under the
* constraints of the current context settings. Essentially, the color
* at the specified coordinates (in the drawable) is measured and the
* selection expands outwards from that point to any adjacent pixels
* which are not significantly different (as determined by the
* threshold and criterion context settings). This process continues
......@@ -225,17 +125,17 @@ gimp_image_select_polygon (gint32 image_ID,
* Since: GIMP 2.8
**/
gboolean
gimp_image_select_fuzzy (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
gdouble x,
gdouble y)
gimp_image_select_contiguous_color (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
gdouble x,
gdouble y)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-select-fuzzy",
return_vals = gimp_run_procedure ("gimp-image-select-contiguous-color",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, operation,
......@@ -359,6 +259,107 @@ gimp_image_select_round_rectangle (gint32 image_ID,
return success;
}
/**
* gimp_image_select_ellipse:
* @image_ID: The image.
* @operation: The selection operation.
* @x: x coordinate of upper-left corner of ellipse bounding box.
* @y: y coordinate of upper-left corner of ellipse bounding box.
* @width: The width of the ellipse.
* @height: The height of the 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 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.
*
* Since: GIMP 2.8
**/
gboolean
gimp_image_select_ellipse (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-select-ellipse",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, operation,
GIMP_PDB_FLOAT, x,
GIMP_PDB_FLOAT, y,
GIMP_PDB_FLOAT, width,
GIMP_PDB_FLOAT, height,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_select_polygon:
* @image_ID: The image.
* @operation: The selection operation.
* @num_segs: Number of points (count 1 coordinate as two points).
* @segs: Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y}.
*
* 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
* 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.
*
* Since: GIMP 2.8
**/
gboolean
gimp_image_select_polygon (gint32 image_ID,
GimpChannelOps operation,
gint num_segs,
const gdouble *segs)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-select-polygon",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, operation,
GIMP_PDB_INT32, num_segs,
GIMP_PDB_FLOATARRAY, segs,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_select_item:
* @image_ID: The image.
......
......@@ -28,42 +28,42 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
gboolean gimp_image_select_color (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
const GimpRGB *color);
gboolean gimp_image_select_ellipse (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
gboolean gimp_image_select_polygon (gint32 image_ID,
GimpChannelOps operation,
gint num_segs,
const gdouble *segs);
gboolean gimp_image_select_fuzzy (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
gdouble x,
gdouble y);
gboolean gimp_image_select_rectangle (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
gboolean gimp_image_select_round_rectangle (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
gdouble corner_radius_x,
gdouble corner_radius_y);
gboolean gimp_image_select_item (gint32 image_ID,
GimpChannelOps operation,
gint32 item_ID);
gboolean gimp_image_select_color (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
const GimpRGB *color);
gboolean gimp_image_select_contiguous_color (gint32 image_ID,
GimpChannelOps operation,
gint32 drawable_ID,
gdouble x,
gdouble y);
gboolean gimp_image_select_rectangle (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
gboolean gimp_image_select_round_rectangle (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
gdouble corner_radius_x,
gdouble corner_radius_y);
gboolean gimp_image_select_ellipse (gint32 image_ID,
GimpChannelOps operation,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
gboolean gimp_image_select_polygon (gint32 image_ID,
GimpChannelOps operation,
gint num_segs,
const gdouble *segs);
gboolean gimp_image_select_item (gint32 image_ID,
GimpChannelOps operation,
gint32 item_ID);
G_END_DECLS
......
......@@ -252,7 +252,7 @@ gimp_free_select (gint32 image_ID,
* @feather_radius: Radius for feather operation.
* @sample_merged: Use the composite image, not the drawable.
*
* Deprecated: Use gimp_image_select_fuzzy() instead.
* Deprecated: Use gimp_image_select_contiguous_color() instead.
*
* Returns: TRUE on success.
**/
......@@ -306,7 +306,7 @@ gimp_fuzzy_select (gint32 drawable_ID,
* @select_transparent: Whether to consider transparent pixels for selection. If TRUE, transparency is considered as a unique selectable color.
* @select_criterion: The criterion used to determine color similarity. SELECT_CRITERION_COMPOSITE is the standard choice.
*
* Deprecated: Use gimp_image_select_fuzzy() instead.
* Deprecated: Use gimp_image_select_contiguous_color() instead.
*
* Returns: TRUE on success.
*
......
......@@ -741,9 +741,9 @@ This should be set as TRUE most of the time unless a binary-only
selection is wanted.
This settings affects the following procedures:
gimp_image_select_color(), gimp_image_select_ellipse(),
gimp_image_select_polygon(), gimp_image_select_fuzzy(),
gimp_image_select_round_rectangle(), gimp_image_select_item().
gimp_image_select_color(), gimp_image_select_contiguous_color(),
gimp_image_select_round_rectangle(), gimp_image_select_ellipse(),
gimp_image_select_polygon(), gimp_image_select_item().
HELP
&mitch_pdb_misc('2010', '2.8');
......@@ -799,9 +799,9 @@ gaussian blur; its radii can be controlled using
gimp_context_set_feather_radius().
This setting affects the following procedures:
gimp_image_select_color(), gimp_image_select_ellipse(),
gimp_image_select_polygon(), gimp_image_select_fuzzy(),
gimp_image_select_color(), gimp_image_select_contiguous_color(),
gimp_image_select_rectangle(), gimp_image_select_round_rectangle(),
gimp_image_select_ellipse(), gimp_image_select_polygon(),
gimp_image_select_item().
HELP
......@@ -919,7 +919,7 @@ pixel data from the composite image ('sample-merged' is TRUE. This is
equivalent to sampling for colors after merging all visible layers).
This setting affects the following procedures:
gimp_image_select_color(), gimp_image_select_fuzzy().
gimp_image_select_color(), gimp_image_select_contiguous_color().
HELP
&mitch_pdb_misc('2011', '2.8');
......@@ -975,7 +975,7 @@ doing a seed fill, this setting controls how color similarity is
determined. SELECT_CRITERION_COMPOSITE is the default value.
This setting affects the following procedures:
gimp_image_select_color(), gimp_image_select_fuzzy().
gimp_image_select_color(), gimp_image_select_contiguous_color().
HELP
&mitch_pdb_misc('2011', '2.8');
......@@ -1033,7 +1033,7 @@ to be considered a similar color. If the sample threshold has not been
set explicitly, the default threshold set in gimprc will be used.
This setting affects the following procedures:
gimp_image_select_color(), gimp_image_select_fuzzy().
gimp_image_select_color(), gimp_image_select_contiguous_color().
HELP
......@@ -1148,7 +1148,7 @@ transparency is considered to be a unique selectable color. When this
setting is TRUE, transparent areas can be selected or filled.
This setting affects the following procedures:
gimp_image_select_color(), gimp_image_select_fuzzy().
gimp_image_select_color(), gimp_image_select_contiguous_color().
HELP
&mitch_pdb_misc('2011', '2.8');
......
......@@ -81,127 +81,23 @@ CODE
}
sub image_select_ellipse {
$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.
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');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'operation', type => 'enum GimpChannelOps',
desc => 'The selection operation' },
{ name => 'x', type => 'float',
desc => 'x coordinate of upper-left corner of ellipse bounding box' },
{ name => 'y', type => 'float',
desc => 'y coordinate of upper-left corner of ellipse bounding box' },
{ name => 'width', type => '0 < float',
desc => 'The width of the ellipse' },
{ name => 'height', type => '0 < float',
desc => 'The height of the ellipse' }
);
%invoke = (
code => <<'CODE'
{
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
gimp_channel_select_ellipse (gimp_image_get_mask (image),
(gint) x, (gint) y,
(gint) width, (gint) height,
operation,
pdb_context->antialias,
pdb_context->feather,
pdb_context->feather_radius_x,
pdb_context->feather_radius_y,
TRUE);
}
CODE
);
}
sub image_select_polygon {
$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.
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');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'operation', type => 'enum GimpChannelOps',
desc => 'The selection operation' },
{ name => 'segs', type => 'floatarray',
desc => 'Array of points: { p1.x, p1.y, p2.x, p2.y, ...,
pn.x, pn.y}',
array => { type => '2 <= int32',
desc => 'Number of points (count 1 coordinate as two
points)' } }
);
%invoke = (
code => <<'CODE'
{
GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
gimp_channel_select_polygon (gimp_image_get_mask (image),
_("Free Select"),
num_segs / 2,
(GimpVector2 *) segs,
operation,
pdb_context->antialias,
pdb_context->feather,
pdb_context->feather_radius_x,
pdb_context->feather_radius_y,
TRUE);
}
CODE
);
}
sub image_select_fuzzy {
sub image_select_contiguous_color {
$blurb = <<'BLURB';
Create a fuzzy selection starting at the specified coordinates on the specified
drawable.
Create a selection by selecting all pixels around specified coordinates
with the same (or similar) color to that at the coordinates.
BLURB
$help = <<'HELP';
This tool creates a fuzzy selection over the specified image. A fuzzy
selection is determined by a seed fill under the constraints of the
current context settings. Essentially, the color at the specified
coordinates (in the drawable) is measured and the selection expands
outwards from that point to any adjacent pixels which are not
significantly different (as determined by the threshold and criterion
context settings). This process continues until no more expansion is
possible. If antialiasing is turned on, the final selection mask will
contain intermediate values based on close misses to the threshold bar
at pixels along the seed fill boundary.
This tool creates a contiguous selection over the specified image. A
contiguous color selection is determined by a seed fill under the
constraints of the current context settings. Essentially, the color
at the specified coordinates (in the drawable) is measured and the
selection expands outwards from that point to any adjacent pixels
which are not significantly different (as determined by the threshold
and criterion context settings). This process continues until no more
expansion is possible. If antialiasing is turned on, the final
selection mask will contain intermediate values based on close misses
to the threshold bar at pixels along the seed fill boundary.
This prodecure is affected by the following context setters:
gimp_context_set_antialias(), gimp_context_set_feather(),
......@@ -366,6 +262,110 @@ CODE
}
sub image_select_ellipse {
$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.
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');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'operation', type => 'enum GimpChannelOps',
desc => 'The selection operation' },
{ name => 'x', type => 'float',
desc => 'x coordinate of upper-left corner of ellipse bounding box' },
{ name => 'y', type => 'float',
desc => 'y coordinate of upper-left corner of ellipse bounding box' },
{ name => 'width', type => '0 < float',