C语言的画图(圆形动画)


#include <stdio.h>
#include <malloc.h>
#include<graphics.h>
#define LEN sizeof(struct student)
#include "math.h"
#define PI 3.1415926

void main()
{initgraph(680,680);

while(1)
{
BeginBatchDraw();
for(int y=100;y<480;++y)
{
setcolor(GREEN);
setfillstyle(YELLOW);
fillellipse(y-30,30,30+y,90); //里面的参数分别是fillellipse(左,上,右,下) 圆的边界


//getchar();
line(0,y,639,y);

FlushBatchDraw();
Sleep(20);
cleardevice();

}}
EndBatchDraw();
closegraph();
getchar();

 

}

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM