Method
GimpImagepick_color
Declaration [src]
gboolean
gimp_image_pick_color (
GimpImage* image,
const GimpDrawable** drawables,
gdouble x,
gdouble y,
gboolean sample_merged,
gboolean sample_average,
gdouble average_radius,
GeglColor** color
)
Description [src]
Determine the color at the given coordinates
This tool determines the color at the specified coordinates. The returned color is an RGB triplet even for grayscale and indexed drawables. If the coordinates lie outside of the extents of the specified drawables, then an error is returned. All drawables must belong to the image and be of the same type. If only one drawable is given and it has an alpha channel, the algorithm examines the alpha value of the drawable at the coordinates. If the alpha value is completely transparent (0), then an error is returned. With several drawables specified, the composite image with only these drawables is used. If the sample_merged parameter is TRUE, the data of the composite image will be used instead of that for the specified drawables. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawables are ignored.
Parameters
drawables
-
Type: An array of
None
The drawables to pick from.
The array must be NULL
-terminated.The data is owned by the caller of the function. x
-
Type:
gdouble
X coordinate of upper-left corner of rectangle.
y
-
Type:
gdouble
Y coordinate of upper-left corner of rectangle.
sample_merged
-
Type:
gboolean
Use the composite image, not the drawables.
sample_average
-
Type:
gboolean
Average the color of all the pixels in a specified radius.
average_radius
-
Type:
gdouble
The radius of pixels to average.
color
-
Type:
GeglColor
The return color.
The argument will be set by the function. The instance takes ownership of the data, and is responsible for freeing it.