Sign in Join
FPDoc Onlineexperiment

TCanvas.FloodFill procedure

Member of TCanvaspublicIn unit Graphics

Fills the area containing the specified point with the current Brush of the canvas. The area can have an arbitrary shape.

Declaration

pascal
procedure FloodFill(X: Integer; Y: Integer; FillColor: TColor; 
 FillStyle: TFillStyle); virtual; reintroduce

Arguments

X

Horizontal coordinate where the fill operation is started.

Y

Vertical coordinate where the fill operation is started.

FillColor

Color replaced or used as a boundary in the fill operation.

FillStyle

Determines whether FillColor is the boundary or the target for the fill operation.

Description

FloodFill is a method used to fill the area at the point specified in X, Y with the style, color, or bitmap defined in Brush.

FillColor contains the color value for the boundary of the fill, or the area to be filled, depending on the value in FillStyle.

FillStyle determines the type of fill operation performed in the method:

fsBorder
The fill area is bounded by pixels with the color specified in FillColor. Pixels are filled in all directions with the Brush until the a pixel with the specified FillColor is found.
fsSurface
The fill area is defined by all pixels having the color specified in FillColor. Pixels with this color are filled in all directions with the Brush until no more pixels with this color are found.

FloodFill calls the routine in the LCL interface used to implement the method for the widgetset. The return value from the LCL interface is ignored.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.