-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest Graphics.cpp
More file actions
46 lines (34 loc) · 801 Bytes
/
Test Graphics.cpp
File metadata and controls
46 lines (34 loc) · 801 Bytes
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
#include<graphics.h>
#include<conio.h>
#include<dos.h>
main()
{
int gd = DETECT, gm, x, y, angle = 0;
struct arccoordstype a;
char driver[] = " ";
initgraph(&gd, &gm,driver);
delay(1000);
do
{
setcolor(BLACK);
arc(getmaxx()/2,getmaxy()/2,angle,angle+2,50);
getarccoords(&a);
setcolor(YELLOW);
circle(a.xstart,a.ystart,25);
setcolor(BLACK);
arc(getmaxx()/2,getmaxy()/2,angle,angle+2,100);
setcolor(RED);
getarccoords(&a);
circle(a.xstart,a.ystart,25);
setcolor(BLACK);
arc(getmaxx()/2,getmaxy()/2,angle,angle+2,150);
getarccoords(&a);
setcolor(BLUE);
circle(a.xstart,a.ystart,25);
angle = angle+5;
delay(50);
}
while(angle<=360);
getch();
closegraph();
}