[Overview][Types][Classes][Index] | Reference for unit 'LazCanvas' (#lcl)

# TLazCanvas.DoPolygonFill

Implements a polygon fill algorithm not present in fcl-image prior to FPC version 3.2.3.

## Declaration

Source position: lazcanvas.pas line 108

`protected procedure TLazCanvas.DoPolygonFill(`
`const points: array of TPoint`
`); override;`

## Arguments

`points` |  | Array with the TPoint records representing the polygon vertices.

## Description

Implements a polygon fill algorithm not present in fcl-image. Part of the algorithm is explained here.

DoPolygonFill is defined when using FPC versions prior to 3.2.3. In FPC 3.2.3, the method already exists in the TFPPixelCanvas ancestor and is not needed in TLazCanvas.

## Version info

Modified in LCL versions after 2.2.4 to call DrawPixel instead of SetColor when drawing pixels between points on the polygon. This allows the DrawingMode (opacity, alphablending, custom) to be applied to the pixels. Adds support for the non-zero winding rule in the fill operation.

## See also

TLazCanvas.AlphaBlend |  | Alpha blends the specified content from the source canvas onto the canvas instance.
TLazCanvas.SetColor |  | Sets the color for the pixel at the specified coordinates.