您现在的位置是:首页 > 技术资料 > easyX图形库
推荐星级:
  • 1
  • 2
  • 3
  • 4
  • 5

easyX图形库

更新时间:2019-12-07 12:07:47 大小:129K 上传用户:sss568查看TA发布的资源 标签:easyxC++ 下载积分:2分 评价赚积分 (如何评价?) 收藏 评论(0) 举报

资料介绍

可以帮助写C++,图形化编程常用语句 或有帮助的头文件的解释和用法都在里面,对想写游戏的人帮助很大

部分文件列表

文件名 大小
easyX图形库.pdf 129K

部分页面预览

(完整内容请下载后查看)
第三方库--EasyX 功能说明:  
实现简单的绘图  
// 绘图模式相关函数  
HWND initgraph(int width, int height, int flag = NULL); // 初始化图形  
环境  
void closegraph();  
// 关闭图形环  
// 绘图环境设置  
void cleardevice();  
void setcliprgn(HRGN hrgn);  
void clearcliprgn();  
// 清屏  
// 设置当前绘图设备的裁剪区  
// 清除裁剪区的屏幕内容  
void getlinestyle(LINESTYLE* pstyle);  
前画线样式  
// 获取当  
// 设置当  
void setlinestyle(const LINESTYLE* pstyle);  
前画线样式  
void setlinestyle(int style, int thickness = 1, const DWORD  
*puserstyle = NULL, DWORD userstylecount = 0); // 设置当前画线样式  
// 获取当  
void getfillstyle(FILLSTYLE* pstyle);  
前填充样式  
void setfillstyle(const FILLSTYLE* pstyle);  
前填充样式  
// 设置当  
void setfillstyle(int style, long hatch = NULL, IMAGE* ppattern =  
NULL); // 设置当前填充样式  
void setfillstyle(BYTE* ppattern8x8);  
前填充样式  
// 设置当  
void setorigin(int x, int y);  
void getaspectratio(float *pxasp, float *pyasp);  
// 设置坐标原  
// 获取当前缩  
// 设置当前缩  
放因子  
void setaspectratio(float xasp, float yasp);  
放因子  
int getrop2();  
// 获取前景的二元光栅操作模式  
// 设置前景的二元光栅操作模式  
void setrop2(int mode);  
int getpolyfillmode();  
void setpolyfillmode(int mode);  
// 获取多边形填充模式  
// 设置多边形填充模式  
void graphdefaults();  
COLORREF getlinecolor();  
// 重置所有绘图设置为默认值  
// 获取当前线条颜色  
void setlinecolor(COLORREF color); // 设置当前线条颜色  
COLORREF gettextcolor(); // 获取当前文字颜色  
void settextcolor(COLORREF color); // 设置当前文字颜色  
COLORREF getfillcolor(); // 获取当前填充颜色  
void setfillcolor(COLORREF color); // 设置当前填充颜色  
COLORREF getbkcolor(); // 获取当前绘图背景色  
void setbkcolor(COLORREF color); // 设置当前绘图背景色  
int getbkmode();  
// 获取背景混合模式  
// 设置背景混合模式  
void setbkmode(int mode);  
// 颜色模型转换函数  
COLORREF RGBtoGRAY(COLORREF rgb);  
void RGBtoHSL(COLORREF rgb, float *H, float *S, float *L);  
void RGBtoHSV(COLORREF rgb, float *H, float *S, float *V);  
COLORREF HSLtoRGB(float H, float S, float L);  
COLORREF HSVtoRGB(float H, float S, float V);  
// 绘图函数  
COLORREF getpixel(int x, int y);  
// 获取点的颜色  
void putpixel(int x, int y, COLORREF color); // 画点  
void moveto(int x, int y);  
// 移动当前点(绝对坐  
)  
void moverel(int dx, int dy);  
// 移动当前点(相对坐  
)  
void line(int x1, int y1, int x2, int y2);  
void linerel(int dx, int dy);  
// 画线  
// 画线(至相对坐标)  
// 画线(至绝对坐标)  
void lineto(int x, int y);  
void rectangle  
矩形  
void fillrectangle (int left, int top, int right, int bottom); // 画  
(int left, int top, int right, int bottom); // 画  
填充矩形(有边框)  
void solidrectangle(int left, int top, int right, int bottom); // 画  
填充矩形(无边框)  
void clearrectangle(int left, int top, int right, int bottom); // 清  
空矩形区域  
void circle  
(int x, int y, int radius);  
// 画圆  
void fillcircle (int x, int y, int radius);  
void solidcircle(int x, int y, int radius);  
void clearcircle(int x, int y, int radius);  
// 画填充圆(有边框)  
// 画填充圆(无边框)  
// 清空圆形区域  

全部评论(0)

暂无评论