ImagePolygon function
This function is used to draw a polygon.
imagepolygon ( int im, array points, int num_points, int col)
Arguments Are:
im - image identifier. Example $im = ImageCreate(590, 260);
array points - Polygon Vertices.
num_points - Total Num Of Vertices in Ploygon.
col - color to allocate
Example
$ih = ImageCreate(590, 260);
$white = ImageColorAllocate($ih, 255, 255, 255);
$black = ImageColorAllocate($ih, 0, 0, 0);
$points = array(
200, 50,
50, 200,
200, 300
);
$num = count($points) / 2;
ImageFilledPolygon($ih,$points,$num,$black);
ImagePNG($ih);
