资 源 简 介
#include
#include
#define PI 3.14159265
// 主函数
void main()
{
// 创建大小为 800 * 600 的绘图窗口
initgraph(800, 600);
// 设置原点 (0, 0) 为屏幕中央(Y轴默认向下为正)
setorigin(400, 300);
// 使用白色填充背景
setbkcolor(WHITE);
cleardevice();
// 画脸
setfillcolor(RGB(7, 190, 234)); // 头
setlinecolor(BLACK);
fillroundrect(-135, -206, 135, 54, 248, 248);
setfillcolor(WHITE); // 脸
fillellipse(-115, -144, 115, 46);
fillroundrect(-63, -169, 0, -95, 56, 56); // 右眼
fillroundrect(0, -169, 63, -95, 56, 56); // 左眼
setfillcolor(BLACK);
solidcircle(-16, -116, 6); // 右眼球
solidcircle( 16, -116, 6); // 左眼球
setfillcolor(RGB(201, 62, 0)); // 鼻子