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