Sunday, 25 January 2015

Micki Mouse

#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm; //gd=graphic device, gm=graphic mode
initgraph(&gd,&gm,"C:\\TC\\BGI");
rectangle(0,0,getmaxx(),getmaxy());
arc(240,120,40,140,70); //for top head between ears
ellipse(165,80,10,280,20,20); //left ear
ellipse(315,80,-100,170,20,20); //right ear
arc(235,120,163,215,70);  //below left ear
arc(245,120,-35,17,70); //below right ear
ellipse(193,178,85,280,40,20);  //left chick
ellipse(283,178,-100,95,40,20);  //right chick
ellipse(238,199,180,0,39,50); //chin
ellipse(213,123,44,240,33,40); //above left eye
ellipse(262,123,-60,135,33,40); //above right eye
ellipse(210,123,0,360,13,20);//left eye  (white portion)
ellipse(265,123,0,360,13,20);//right eye  (white portion)
ellipse(210,133,0,360,10,10);//left eye ball  (black portion)
ellipse(265,133,0,360,10,10);//right eye ball  (black portion)
ellipse(210,133,0,360,3,3);//left eye ball  (white circle)
ellipse(265,133,0,360,3,3);//right eye ball  (white circle)
ellipse(238,160,0,360,10,13);//nose
arc(240,125,228,312,68);//mouth
arc(240,120,230,310,72);//mouth
setfillstyle(1,4);  //nose
floodfill(238,160,15); //"
setfillstyle(1,15);  //eye
floodfill(210,113,15); //"
floodfill(265,113,15); //"
setfillstyle(1,9); //face colour LIGHTBLUE
floodfill(210,100,15); //"
setfillstyle(1,1); //head colour BLUE
floodfill(315,80,15);
//t-shirt
moveto(203,220);
lineto(203,260);
lineto(183,260);
lineto(183,350);
lineto(293,350);
lineto(293,260);
lineto(273,260);
lineto(273,220);
// pant
moveto(183,350);
lineto(173,460);
lineto(213,460);
lineto(238,400);
lineto(263,460);
lineto(303,460);
lineto(293,350);
//left shoe
moveto(173,460);
lineto(143,478);
lineto(213,478);
lineto(213,460);
//right shoe
moveto(263,460);
lineto(263,478);
lineto(333,478);
lineto(303,460);
line(238,400,238,350);
//right hand
moveto(183,260);
lineto(113,310);
lineto(183,375);
moveto(183,280);
lineto(137,310);
lineto(181,353);
setfillstyle(2,13);  //t-shirt colour
floodfill(200,300,15);
setfillstyle(1,5);// pant colour
floodfill(223,400,15);
setfillstyle(1,5);
floodfill(253,400,15);
setfillstyle(1,6);  // shoe colour
floodfill(173,470,15);
floodfill(303,470,15);
//left hand
moveto(293,260);
lineto(363,280);
lineto(413,240);
moveto(293,280);
lineto(363,300);
lineto(413,260);
// fingers
ellipse(413.5,228,0,180,3.5,3.5);
line(420,240,433,240);
line(423,247,440,247);
line(413,240,410,228);
line(417,228,420,240);
ellipse(433,243.5,-90,90,3.5,3.5);
line(423,254,440,254);
ellipse(440,250.5,-90,90,3.5,3.5);
ellipse(430,257,-90,90,3,3);
line(413,260,430,260);
//TEXT EDIT
setcolor(14);
settextstyle(0,0,7);
outtextxy(350,100,"VSGOI");
setcolor(14);
settextstyle(0,0,9);
outtextxy(350,330,"CMS");
getch();
}

No comments:

Post a Comment