My Profile

Ahmednagar, Maharashtra, India
I, Das ShrikKrishna J. MCA III IMSCD&R, Ahmednagar.
Showing posts with label Program to fill Polygon Graphics(C). Show all posts
Showing posts with label Program to fill Polygon Graphics(C). Show all posts

Thursday, 28 July 2011

Program to fill Polygon

/* 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();
}

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls