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,y,gm,gd=DETECT;

int array[]={540,220,590,270,570,320,510,320,490,270,540,220};

clrscr();

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

x=getmaxx();

y=getmaxy();

setcolor(WHITE);

rectangle(x/30,y/20,x/5,y/4);

outtextxy(x/30+15,y/8+5,"RECTANGLE");

circle(x/2,y/6,75);

putpixel(x/2,y/6,WHITE);

outtextxy(x/2-textwidth("circle")/2,y/6+10,"circle");

arc(x/1.2,y/6,300,90,80);

outtextxy(x/1.2,y/6,"Arc");

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.