FloodFill Class

Applies a flood fill transformation (analogue to Paint Bucket tool in the Adobe® Photoshop®) to an image.

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


public sealed class FloodFill : MaskTransform


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 the 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 not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also