/* Program to fill Polygon */
#include<stdio.h>#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
int np=4,tri[8]={200,50,150,100,250,100,200,50};
int hex[14]={400,50,450,50,500,100,450,150,400,150,350,100,400,50};
initgraph(&gd,&gm,"c:\\turboc3\\");
setcolor(5);
setbkcolor(3);
setfillstyle(1,4);
fillpoly(np,tri);
//floodfill(200,75,5);
np=7;
setcolor(5);
setbkcolor(3);
setfillstyle(5,4);
fillpoly(np,hex);//floodfill(450,100,5);
getch();
closegraph();
}