[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'LazRegions' (#lcl)

# TLazRegion.AddPolygon

Adds a polygonal area with the specified vertices to the region.

## Declaration

Source position: lazregions.pas line 81

`public procedure TLazRegion.AddPolygon(`
`var APoints: TPointArray;`
`AFillMode: TLazRegionFillMode`
`);`

## Arguments

`APoints` |  | Array of TPoint instances representing the vertices for the polygon.
`AFillMode` |  | TLazRegionFillMode value used for the polygon.

## Description

AddPolygon is a procedure used to add a polygonal area with the specified vertices to the region. APoints is an array with TPoint instances that define each of the vertices for the polygon. AFillMode is a TLazRegionFillMode value that defines the fill mode for the polygonal area.

AddPolygon creates a TLazRegionPolygon instance that is used to store the area definition in the Parts member. The arguments to the method are assigned to the Points and FillMode members in the new class instance. AddPolygon calls AddPart to store the new TLazRegionPolygon instance in Parts.

## See also

TLazRegion.AddPart |  | Adds the specified part as a subregion in the Parts member.
TLazRegionPolygon |  | Represents a region defined as a series of vertices for a polygon.
TLazRegionPolygon.Points |  | Array of TPoint values that define the vertices for the polygonal region.
TLazRegionPolygon.FillMode |  | Fill mode used for the polygon.
TPointArray |  | Defines an array type used for TPoint values.
TLazRegionFillMode |  | Represents region fill modes used for polygons in Lazarus regions.
GraphType.TPointArray