drawpoly

The function is used to draw a polygon without filling.

void drawpoly(
	int numpoints,
	const int *polypoints
);

Parameters

numpoints

The number of polygon vertices.

polypoints

The coordinates of each point, the number of array elements is numpoints * 2.
The function automatically connects the polygon start and end.

Return Value

None

Remarks

The function is declared in graphics.h and is used to be compatible with function of the same name in Turbo C, equivalent to the polygon function in easyx.h.

It is recommended that use polygon instead of the function.

Examples

The following snippet draws a closed triangle without filling:

int points[] = {50, 200,  200, 200,  200, 50};
drawpoly(3, points);