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.

Parameters

xOffset ssize_t

Starting x location for the operation.

xOffset ssize_t

Starting y location for the operation.

fillToBorder bool

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

channel ChannelType

The affected channels.

Meta