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

FloodFill Constructor (Int32, Int32, Color, Color, FloodFillMode, Single)

Creates and initializes new FloodFill class instance. You can set main flood fill parameters here.

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

Syntax

Visual Basic
Public Sub New ( _
	x As Integer, _
	y As Integer, _
	fillColor As Color, _
	targetColor As Color, _
	mode As FloodFillMode, _
	tolerance As Single _
)
C#
public FloodFill(
	int x,
	int y,
	Color fillColor,
	Color targetColor,
	FloodFillMode mode,
	float tolerance
)

Parameters

x

Type: System.Int32

X-coordinate of the point to start filling from. You can change it later using Point property.
y

Type: System.Int32

Y-coordinate of the point to start filling from. You can change it later using Point property.
fillColor

Type: Aurigma.GraphicsMill.Color

Color value that specifies a color to fill with. You can change it later using FillColor property.
targetColor

Type: Aurigma.GraphicsMill.Color

The Color which is used to determine the filling area boundaries. The method behaviour depends on mode argument value. If mode is UntilColor, this is a boundary color (when algorithm meets this color, it stops filling). If mode is TillColor, this is a surface color (algorithm continue filling till current color is the same as target color). You can change it later using TargetColor property.
mode

Type: Aurigma.GraphicsMill.Transforms.FloodFillMode

FloodFillMode value specifying how to determine the filling area boundary (see comments for targetColor). You can change it later using Mode property.
tolerance

Type: System.Single

Value in range [0, 1] specifying admissible tolerance (distance between colors in color space) when comparing current color and target color (see comments for targetColor). Minimum value (0) means exact match of the colors, maximum value (1) means that any color matches. You can change it later using Tolerance property.

See Also

Reference