<Array of coordinates>: Array of integers or array of points

WLanguage array of integers containing the coordinates of polygon points. The even subscript represent the X coordinates while the odd subscripts represent the Y coordinates of points. These coordinates are expressed in pixels.

Versions 22 and later WLanguage array of Point variables containing the coordinates of polygon points. These coordinates are expressed in pixels.

New in version 22 WLanguage array of Point variables containing the coordinates of polygon points. These coordinates are expressed in pixels.

WLanguage array of Point variables containing the coordinates of polygon points. These coordinates are expressed in pixels. WLanguage array of Point variables containing the coordinates of polygon points. These coordinates are expressed in pixels.

<Background color>: Integer or constant (optional)

Background color of polygon. This color can correspond to:

Coordinates are given with respect to the top left corner of the image (coordinates: (0.0)).

Important: There is no need to close the polygon (the coordinates of last point do not have to be equal to the coordinates of first point). The polygon is automatically "closed".

Limits: a polygon can contain up to 100 000 points in WINDEV, WEBDEV and Java, and up to 1000 points in Windows CE.

Drawing with opacity or anti-aliasing

In the case of a drawing with opacity (<picLayer variable>.StartDrawing with the dWithOpacity constant) or anti-aliasing (<picLayer variable>.ChangeMode with the drawAntiAliasing constant), the outline is drawn over the inside of the polygon: therefore, the line is partly combined with the inside of the polygon. If the line is very thick, it will be displayed in two colors.

Related Examples:

Unit examples (WINDEV): The drawing functions

[ + ] Using the main drawing functions of WINDEV to: - Initialize an Image control for drawing - Draw simple shapes - Write a text into a drawing - Change the color in a drawing