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

# TWidgetSet.CreatePolygonRgn

Creates a polygonal region.

## Declaration

Source position: winapih.inc line 69

`public function TWidgetSet.CreatePolygonRgn(`
`Points: PPoint;`
`NumPts: Integer;`
`FillMode: Integer`
`):HRGN; virtual;`

## Arguments

`Points` |  | The array of points.
`NumPts` |  | The number of points in Points.
`FillMode` |  | Can be ALTERNATE or WINDING.

## Function result

The region Handle, zero on failure.

## Description

The Points parameter is an array of points that give the vertices of the polygon. The connections between two points can cross others.

FillMode determines what points are going to be included in the region. When FillMode=Winding points are selected by using the Winding fill algorithm. When FillMode=ALTERNATE points are selected by using using the even-odd (alternative) fill algorithm.

The last point is connected to the first point to close the region.