Drawing a polygon (Polygon)

Polygon()

Draw a polygon


SYNTAX

Polygon(window_id, point_array, count)

Draw a polygon consisting of two or more vertices connected by straight lines. The polygon’s outline is drawn using the current pen, and filled using the current brush and polygon fill mode.

The polygon is closed automatically, by drawing a line from the last vertex to the first.

window_id

The identifier of the window in which the polygon is to be drawn. To print it in the current report, specify NULL instead of a window_id.

point_array

A numeric array, the contents of which define the vertices of the polygon. See Arrays of points.

count

The number of vertices defined in the array. This number must be greater than or equal to 2.


NOTES

  • The current position is neither used nor updated by the Polygon function.

  • The polygon fill mode is set by the SetPolyFill() function.


RELATED TOPICS

Drawing operations

Draw functions