跪求用c语言编程绘制椭圆并设置前景色和背景色!!!
来源:百度知道 编辑:UC知道 时间:2024/07/07 10:21:23
老大谢谢了!
TC编译
#include "graphics.h"
int main()
{
int driver=DETECT,mode;
int x,y;
initgraph(&driver,&mode,"d:\\tc3\\bgi");
x=(getmaxx()+1)/2 ;
y= (getmaxy()+1)/2 ;
setbkcolor(BLUE);
setfillstyle(1,14);
fillellipse(x,y,50,100);
getchar();
closegraph();
return 0;
}
textmode(C80);
textbackground(2);
textcolor(BLACK);
看这三个函数你能用不,括号里的数字也是设置颜色和风格的代码!!
TC 中调用图象函数
#include<graphics.h>