Sign in Join
FPDoc Onlineexperiment

TWidgetSet.Polygon function

Member of TWidgetSetpublicIn unit InterfaceBase

Draws a filled Polygon.

Declaration

pascal
function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; 
 Winding: Boolean): Boolean; virtual

Arguments

DC

The device context.

Points

The array of vertices.

NumPts

The number of vertices.

Winding

Selects the fill algorithm.

Function result

False on failure.

Description

Use Polygon to draw a closed, many-sided shape on the canvas, outlined with the current Pen and filled with the current Brush.

The Points parameter is an array of the vertices of the polygon.

Winding determines how the polygon is filled. When Winding is True, Polygon fills the shape using the Winding fill algorithm. When Winding is False, Polygon uses the even-odd (alternative) fill algorithm.

The first point is always connected to the last point.

To draw an unfilled polygon use the Polyline method, specifying the first point a second time at the end.

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