/* ============== Program Description ============= */ /* program name : ch24_22.c */ /* arc() and setcolor() application. */ /* ================================================== */ #include void main(void) { int driver = DETECT,mode; int x_center = 100, y_center = 280, radius = 80; struct arccoordstype point; int i; initgraph(&driver,&mode,"G:\\APPS\\BC31.WIN\\bgi"); for ( i = 0; i < 4; i++ ) { setcolor(i+1); arc(x_center,y_center,30,330,radius); getarccoords(&point); line(x_center,y_center,point.xstart,point.ystart); line(x_center,y_center,point.xend,point.yend); circle(x_center+radius*0.2,y_center-radius*0.5,radius*0.1); x_center += radius*2 + 10; radius -= 10; } getch(); /* press any key return to TEXT mode */ closegraph(); }