- 0
- 0
- 约4.67千字
- 约 34页
- 2017-04-10 发布于上海
- 举报
圖形操作简介
图形操作简介
必要的头文件
必须的系统变量
初始化图形界面
初始化出错处理
取得必须的信息
关闭图形界面
一些常用的画图函数
必要的头文件
#include dos.h
#include conio.h
#include stdio.h
#include stdlib.h
#include graphics.h
必须的变量
int GraphDriver;
int GraphMode;
double AspectRatio;
int MaxX, MaxY;
int MaxColors;
int ErrorCode;
struct palettetype palette;
初始化图形界面
GraphDriver = DETECT;
initgraph(GraphDriver,GraphMode, );
initgraph(GraphDriver,GraphMode, ”d:\\tc );
初始化出错处理
ErrorCode = graphresult();
if( ErrorCode != grOk ){
printf( Graphics System Error: %s\n, grapherrormsg( ErrorCode ) );
exit( 1 );
}
取得必须的参数
原创力文档

文档评论(0)