Image.floodFill

Changes the color value of any pixel that matches target and is an immediate neighbor. To the fillColor or fillPattern set for this image. If fillToBorder is true, the color value is changed for any neighbor pixel that does not match the borderColor.

By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz property of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.

class Image
void
floodFill

Parameters

xOffset
Type: ssize_t

Starting x location for the operation.

xOffset
Type: ssize_t

Starting y location for the operation.

fillToBorder
Type: bool

If true fill untill the borderColor, else only the target color if affected.

channel

The affected channels.

Meta