select_color


Description:

[ Version ( since = "2.8" ) ]
public bool select_color (ChannelOps operation, Drawable drawable, Color color)

Create a selection by selecting all pixels (in the specified drawable) with the same (or similar) color to that specified.

This tool creates a selection over the specified image. A by-color selection is determined by the supplied color under the constraints of the current context settings. Essentially, all pixels (in the drawable) that have color sufficiently close to the specified color (as determined by the threshold and criterion context values) are included in the selection. To select transparent regions, the color specified must also have minimum alpha.

This procedure is affected by the following context setters: context_set_antialias, context_set_feather, context_set_feather_radius, context_set_sample_merged, context_set_sample_criterion, context_set_sample_threshold, context_set_sample_transparent.

In the case of a merged sampling, the supplied drawable is ignored.

Parameters:

this

The affected image.

operation

The selection operation.

drawable

The affected drawable.

color

The color to select.

Returns:

TRUE on success.