该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
代码仅供参考,至于怎么修改,你懂的....
#include
#include
#include
#include
void DDALine(int x0, int y0, int x1, int y1, int color);
void MidBresenhamLine(int x0, int y0, int x1, int y1, int color);
void BresenhamLine(int x0, int y0, int x1, int y1, int color);
void MidBresenhamCircle(int r, int color);
void MidBresenhamEllipse(int a, int b, int color);
int main()
{
DDALine(0,0,2000,3000,GREEN);
MidBresenhamLine(0,0,2000,3000,RED);
BresenhamLine(0,0,2000,300,BLUE);
MidBresenhamCircle(100,RED);
MidBresenhamEllipse(320,100,BLUE);
getch();
return 0;
}
void DDALine(int x0, int y0, int x1, int y1, int color)
{
int dx,dy,epsl,k;
float x,y,xIncre,yIncre;
dx = x1 - x0; dy = y1 - y0;
x &#