fillpolygon
This function is used to draw a filled polygon with a border.
void fillpolygon(
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
Remarks
This function draws a filled polygon with a border using the current line and fill style.
Examples
The following snippet draws a closed fill triangle (two methods):
// method 1
POINT pts[] = { {50, 200}, {200, 200}, {200, 50} };
fillpolygon(pts, 3);
// method 2
int pts[] = {50, 200, 200, 200, 200, 50};
fillpolygon((POINT*)pts, 3);