#include<graphics.h>
#include<stdio.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\tc\\bgi");
circle(200,250,150);
getch();
closegraph();
}
//Color demo
#include<graphics.h>
#include<stdio.h>
void main()
{
int gd=DETECT,gm,maxx,maxy,x=40,y=40,fst;
char str[40];
char
*pattern[]={ "EMPTY_FILL","SOLID_FILL","LINE_FILL"};
initgraph(&gd,&gm,"c:\\tc\\bgi");
maxx=getmaxx();
maxy=getmaxy();
rectangle(0,10,maxx,maxy);
setcolor(WHITE);
outtextxy(175,0,"Pre-defined Fill Style");
closegraph();
}
//Draw line
#include<stdio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
line(100,50,100,350);
getch();
closegraph();
}
//draw shapes
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gm,gd=DETECT,x,y;
initgraph(&gd,&gm,"c:\\tc\\bgi");
x=getmaxx();
y=getmaxy();
line(5,5,50,10);
rectangle(20,40,56,86);
circle(200,200,150);
ellipse(200,200,50,70,0,0);
getch();
closegraph();