[求助]为什么变化的圆不能缩小?
#include <graphics.h>#include <dos.h>
#define MaxR 200
#define R 20
void main()
{
int gdriver=DETECT,gmode;
int x=240,y=240,r; /*确定圆心和半径*/
int stepR=5; /*画圆间距*/
r=R;
/*初始化数据*/
initgraph(&gdriver,&gmode,"");
setwritemode(XOR_PUT);
setbkcolor(2);
setcolor(1);
setlinestyle(SOLID_LINE,0,1);
while (!kbhit())
{
r=r+stepR ;
circle(x,y,r);
if (r>=MaxR||r==R ){
stepR=-stepR;
}
delay(1000000);
}
closegraph();
}