Sign in Join
FPDoc Onlineexperiment

TWidgetSet.FloodFill function

Member of TWidgetSetpublicIn unit InterfaceBase

Fills an area of the display surface with the current brush.

Declaration

pascal
function FloodFill(DC: HDC; X: Integer; Y: Integer; 
 Color: TGraphicsColor; FillStyle: TGraphicsFillStyle; 
 Brush: HBRUSH): Boolean; virtual

Arguments

DC

The device context.

X

The starting point.

Y

The starting point.

Color

The area or boundary color, depending on FillStyle.

FillStyle

fsBorder or fsSurface.

Brush

The brush used to fill the area.

Function result

False on failure.

Description

FillStyle specifies the area:

  • When FillStyle is fsBorder, the area is bounded by a certain Color, the boundary must not have gaps in it.
  • When FillStyle is fsSurface, the area has the specified Color, and all adjacent pixels of this color are replaced.

Filling starts at a given point, which resides somewhere inside the area.

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