forked from thisisshub/HacktoberFest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Graphics Program
71 lines (56 loc) · 1.32 KB
/
Graphics Program
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include<graphics.h>
#include<conio.h>
#include<math.h>
int main()
{
int gd = DETECT , gm,a,b,i,r,x,y;
initgraph(&gd,&gm,"");
setcolor(DARKGRAY);
setfillstyle(SOLID_FILL,YELLOW);
line(150,100,65,225);
line(150,100,225,225); //triangle
line(65,225,225,225);
floodfill(150,160,DARKGRAY);
//lines in triangle
a=65;
while(a<225)
{
delay(100);
line(150,100,a,225);
a=a+10;
}
setfillstyle(SOLID_FILL,YELLOW);
line(150,100,330,75);
line(225,225,430,195);
line(150,100,225,225);
line(330,75,430,195);
floodfill(300,150,DARKGRAY);
setfillstyle(SOLID_FILL,BROWN);
rectangle(65,225,225,390);
floodfill(130,275,DARKGRAY);
setfillstyle(SOLID_FILL,YELLOW);
rectangle(125,300,170,390);
rectangle(75,300,110,335);
floodfill(150,350,DARKGRAY);
floodfill(95,320,DARKGRAY);
line(145,300,145,390);
line(90,300,90,335);
setfillstyle(SOLID_FILL,BROWN);
line(225,225,430,195);
line(225,225,225,390);
line(225,390,430,340);
line(430,340,430,195);
floodfill(300,300,DARKGRAY);
setfillstyle(SOLID_FILL,YELLOW);
rectangle(325,280,370,360);
rectangle(260,295,300,325);
floodfill(270,310,DARKGRAY);
floodfill(350,310,DARKGRAY);
line(345,285,345,360);
line(280,300,280,330);
setfillstyle(SOLID_FILL,YELLOW);
circle(330,235,15);
floodfill(330,235,8);
getch();
closegraph();
}