You are here

fillpoly function in c

Fillpoly function draws and fills a polygon. It require same arguments as drawpoly.

Declaration: void drawpoly( int num, int *polypoints );
For details of arguments see drawpoly.
fillpoly fills using current fill pattern and color which can be changed using setfillstyle.

C program

#include <graphics.h>
#include <conio.h>

   int gd=DETECT,gm,points[]={320,150,440,340,230,340,320,150};

   initgraph(&gd, &gm, "C:\\TC\\BGI");

   fillpoly(4, points);

   return 0;