<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.

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

<Background color>: Integer or constant (optional)

Polygon background color. 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 (function <Image variable>.StartDrawing with the constant dWithOpacity) or anti-aliasing (function <Image variable>.ChangeMode with the constant drawAntiAliasing), the contour 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