Home   Easy-Code    Forum  Updater 
Twitter Facebook



Different symbols using c graphics

Critics Rating:

Users Rating:



          /* DIFFERENT SYMBOLS */



#include <stdio.h>

#include <graphics.h>

main()

{

int x=600,y=450,gm,gd=DETECT,maxx,maxy;

int array[]={350,180,400,80,450,180,350,180};

clrscr();

initgraph(&gd,&gm," ");

maxx=getmaxx();

maxy=getmaxy();

rectangle(0,20,maxx,maxy);

setcolor(WHITE);

outtextxy(150,10,"Fill Figures using different functions");

ellipse(x/4,10*y/35,0,360,100,50);

outtextxy(x/4-textwidth("ellipse")/2,y/24+10,"ellipse");

setfillstyle(SOLID_FILL,RED);



line(x/30,10*y/15,x/6,10*y/15);

outtextxy(x/30+10,10*y/15+10,"Line");

ellipse(x/2,10*y/17,0,360,100,50);

putpixel(x/2,10*y/17,WHITE);

outtextxy(x/2-textwidth("Ellipse")/2,10*y/17+10,"Elipse");

drawpoly(6,array);

outtextxy(515,270,"Polygon");

getch();

closegraph();

restorecrtmode();

}

Courtesy, Source, References & Regards: Kishore AVGK

While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright@2009-2011 by KuGuNi.com. All Rights Reserved.