#include #include #include #include void main() { int GraphDriver; /* The Graphics device driver */ int GraphMode; /* The Graphics mode value */ struct point { int x,y; } p1,p2; int radius,i,k,le,ri,to,bo; void *mem; printf("give me the circle point--->"); scanf("%d %d",&p1.x,&p1.y); printf("give me the radius --->"); scanf("%d",&radius); getche(); GraphDriver = DETECT; /* Request auto-detection */ initgraph( &GraphDriver, &GraphMode, "" ); /* just increasing p1 - p2 */ setcolor(14); circle(p1.x,p1.y,radius); getche(); setcolor(14); circle(p1.x,p1.y,radius); le=p1.x-radius; ri=p1.x+radius; to=p1.y-radius; bo=p1.y+radius; mem=malloc(imagesize(le,to,ri,bo)); getimage(le,to,ri,bo,mem); if (le > to) k=le; else k=to; for (i=k+15; i <= k+200; i+=5) { putimage(i,i,mem,OR_PUT); delay(1000); /* COPY_PUT -- not transparent */ /* OR_PUT -- transparent */ } getche(); closegraph(); /* Return the system to text mode */ }