initgraph(x,y); //初始化
Closegraph();//关闭
画了一个诡异小熊
#include <graphics.h>
#include <conio.h>
int main()
{
initgraph(640, 480);
setfillcolor(WHITE);
fillcircle(130,120,35);
fillcircle(330,120,35);
setfillcolor(BLACK);
fillcircle(130,120,20);
fillcircle(330,120,20);
setfillcolor(WHITE);
fillellipse(60,100,400,350);
setfillcolor(BLACK);
fillcircle(150,200,40);
fillcircle(310,200,40);
fillellipse(150,230,310,330);
setfillcolor(WHITE);
fillcircle(150,200,20);
fillcircle(310,200,20);
fillcircle(230,225,20);
line(230,225,230,275);
line(200,275,260,275);
_getch();
closegraph();
return 0;
}
因为不太会用arc,就用直线画了小熊嘴巴。
(看不懂起始弧度终止弧度)
既然看小熊了,就顺便看看CAD小熊机器猫和旋转佩奇吧。