polygon
This function is used to draw a polygon without filling.
void polygon(
const POINT *points,
int num
);
Parameters
points
The coordinates of each point, the number of array elements is num.
The function automatically connects the polygon to the end.
num
The number of polygon vertices.
Return Value
None
Examples
The following snippet draws a triangle (two methods)
// method 1
POINT pts[] = { {50, 200}, {200, 200}, {200, 50} };
polygon(pts, 3);
// method 2
int pts[] = {50, 200, 200, 200, 200, 50};
polygon((POINT*)pts, 3);