This documentation is for the old version. Go to the latest Graphics Mill docs

FloodFill Class

This transform provides flood fill algorithm (analogue to Paint Bucket tool in the Adobe® Photoshop®).

Namespace: Aurigma.GraphicsMill.Transforms
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public NotInheritable Class FloodFill _
	Inherits MaskedBitmapTransform
C#
public sealed class FloodFill : MaskedBitmapTransform

Remarks

This transform works in the following way: you specify a start point (with Point property) and it begins filling this point and its neighbour with a color specified with FillColor property until a boundary will be met. Boundary can be defined in different ways: either as pixels of color equal to TargetColor property, or pixels which differ from this color. It is specified with Mode property.

As color values can differ very slightly (due various factors: noise, JPEG compression artifacts, or image features), sometimes algorithm can work not very well. In these situations you can use property Tolerance. This property means the how close current pixel color can be to target color to match. If tolerance is very small only colors very close to target color matches. If big value specified (near 1), almost all colors matches. Thereby if property ProcessHalftones is set to false, algorithm will just replace all matching colors, otherwise it will blend matching colors with the original pixel using distance between these colors as a transparency level (this way you can produce more or less smooth edges on the boundaries).

Inheritance Hierarchy

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

Supported Pixel Formats

Member NameDescription
Format8bppGrayScale8 bits per pixel. Grayscale. 8 bits are used for luminosity level.
Format16bppGrayScale16 bits per pixel. Grayscale. All 16 bits are used for luminosity level (extended pixel format).
Format16bppAGrayScale16 bits per pixel. Grayscale with alpha channel. 8 bits are used for alpha channel and other 8 bits are used for luminosity level.
Format32bppAGrayScale32 bits per pixel. Grayscale with alpha channel. 16 bits are used for alpha channel and other 16 bits are used for luminosity level (extended pixel format).
Format24bppRgb24 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components.
Format32bppRgb32 bits per pixel. RGB. 8 bits each are used for the red, green, and blue components. The rest 8 bits are unused.
Format32bppArgb32 bits per pixel. RGB with alpha channel. 8 bits each are used for the alpha, red, green, and blue components.
Format48bppRgb48 bits per pixel. RGB. 16 bits each are used for the red, green, and blue components (extended pixel format).
Format64bppArgb64 bits per pixel. RGB with alpha channel. 16 bits each are used for the alpha, red, green, and blue components (extended pixel format).

See Also

Reference