关于<graphics.h>的头文件
关于<graphics.h>的头文件如下
/******************************************************* EasyX Library for C++ (Ver:20200902)* https://easyx.cn** graphics.h* Based on easyx.h and retaining several old API.******************************************************/#pragma once#include <easyx.h>// 兼容 initgraph 绘图模式的宏定义(无实际意义)
#define DETECT 0
#define VGA 0
#define VGALO 0
#define VGAMED 0
#define VGAHI 0
#define CGA 0
#define CGAC0 0
#define CGAC1 0
#define CGAC2 0
#define CGAC3 0
#define CGAHI 0
#define EGA 0
#define EGALO 0
#define EGAHI 0// 绘图窗口初始化参数(已废弃,请使用新的宏定义)
#define SHOWCONSOLE 1 // 创建图形窗口时,保留控制台的显示
#define NOCLOSE 2 // 没有关闭功能
#define NOMINIMIZE 4 // 没有最小化功能// BGI 格式的初始化图形设备,默认 640 x 480
HWND initgraph(int* gdriver, int* gmode, char* path);void bar(int left, int top, int right, int bottom); // 画无边框填充矩形
void bar3d(int left, int top, int right, int bottom, int depth, bool topflag); // 画有边框三维填充矩形void drawpoly(int numpoints, const int *polypoints); // 画多边形
void fillpoly(int numpoints, const int *polypoints); // 画填充的多边形int getmaxx(); // 获取最大的宽度值
int getmaxy(); // 获取最大的高度值COLORREF getcolor(); // 获取当前绘图前景色
void setcolor(COLORREF color); // 设置当前绘图前景色void setwritemode(int mode); // 设置前景的二元光栅操作模式///
// 以下函数仅为兼容早期 EasyX 的接口,不建议使用。请使用相关新函数替换。
//#if _MSC_VER > 1200#define _EASYX_DEPRECATE(_NewFunc) __declspec(deprecated("This function is deprecated. Instead, use this new function: " #_NewFunc ". See https://docs.easyx.cn/#" #_NewFunc " for details."))#define _EASYX_DEPRECATE_OVERLOAD(_Func) __declspec(deprecated("This overload is deprecated. See https://docs.easyx.cn/#" #_Func " for details."))
#else#define _EASYX_DEPRECATE(_NewFunc)#define _EASYX_DEPRECATE_OVERLOAD(_Func)
#endif// 设置当前字体样式(该函数已不再使用,请使用 settextstyle 代替)
// nHeight: 字符的平均高度;
// nWidth: 字符的平均宽度(0 表示自适应);
// lpszFace: 字体名称;
// nEscapement: 字符串的书写角度(单位 0.1 度);
// nOrientation: 每个字符的书写角度(单位 0.1 度);
// nWeight: 字符的笔画粗细(0 表示默认粗细);
// bItalic: 是否斜体;
// bUnderline: 是否下划线;
// bStrikeOut: 是否删除线;
// fbCharSet: 指定字符集;
// fbOutPrecision: 指定文字的输出精度;
// fbClipPrecision: 指定文字的剪辑精度;
// fbQuality: 指定文字的输出质量;
// fbPitchAndFamily: 指定以常规方式描述字体的字体系列。
_EASYX_DEPRECATE(settextstyle) void setfont(int nHeight, int nWidth, LPCTSTR lpszFace);
_EASYX_DEPRECATE(settextstyle) void setfont(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut);
_EASYX_DEPRECATE(settextstyle) void setfont(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily);
_EASYX_DEPRECATE(settextstyle) void setfont(const LOGFONT *font); // 设置当前字体样式
_EASYX_DEPRECATE(gettextstyle) void getfont(LOGFONT *font); // 获取当前字体样式// 以下填充样式不再使用,新的填充样式请参见帮助文件
#define NULL_FILL BS_NULL
#define EMPTY_FILL BS_NULL
#define SOLID_FILL BS_SOLID
// 普通一组
#define BDIAGONAL_FILL BS_HATCHED, HS_BDIAGONAL // /// 填充 (对应 BGI 的 LTSLASH_FILL)
#define CROSS_FILL BS_HATCHED, HS_CROSS // +++ 填充
#define DIAGCROSS_FILL BS_HATCHED, HS_DIAGCROSS // xxx 填充 (heavy cross hatch fill) (对应 BGI 的 XHTACH_FILL)
#define DOT_FILL (BYTE*)"\x80\x00\x08\x00\x80\x00\x08\x00" // xxx 填充 (对应 BGI 的 WIDE_DOT_FILL)
#define FDIAGONAL_FILL BS_HATCHED, HS_FDIAGONAL // \\\ 填充
#define HORIZONTAL_FILL BS_HATCHED, HS_HORIZONTAL // === 填充
#define VERTICAL_FILL BS_HATCHED, HS_VERTICAL // ||| 填充
// 密集一组
#define BDIAGONAL2_FILL (BYTE*)"\x44\x88\x11\x22\x44\x88\x11\x22"
#define CROSS2_FILL (BYTE*)"\xff\x11\x11\x11\xff\x11\x11\x11" // (对应 BGI 的 fill HATCH_FILL)
#define DIAGCROSS2_FILL (BYTE*)"\x55\x88\x55\x22\x55\x88\x55\x22"
#define DOT2_FILL (BYTE*)"\x88\x00\x22\x00\x88\x00\x22\x00" // (对应 BGI 的 CLOSE_DOT_FILL)
#define FDIAGONAL2_FILL (BYTE*)"\x22\x11\x88\x44\x22\x11\x88\x44"
#define HORIZONTAL2_FILL (BYTE*)"\x00\x00\xff\x00\x00\x00\xff\x00"
#define VERTICAL2_FILL (BYTE*)"\x11\x11\x11\x11\x11\x11\x11\x11"
// 粗线一组
#define BDIAGONAL3_FILL (BYTE*)"\xe0\xc1\x83\x07\x0e\x1c\x38\x70" // (对应 BGI 的 SLASH_FILL)
#define CROSS3_FILL (BYTE*)"\x30\x30\x30\x30\x30\x30\xff\xff"
#define DIAGCROSS3_FILL (BYTE*)"\xc7\x83\xc7\xee\x7c\x38\x7c\xee"
#define DOT3_FILL (BYTE*)"\xc0\xc0\x0c\x0c\xc0\xc0\x0c\x0c"
#define FDIAGONAL3_FILL (BYTE*)"\x07\x83\xc1\xe0\x70\x38\x1c\x0e"
#define HORIZONTAL3_FILL (BYTE*)"\xff\xff\x00\x00\xff\xff\x00\x00" // (对应 BGI 的 LINE_FILL)
#define VERTICAL3_FILL (BYTE*)"\x33\x33\x33\x33\x33\x33\x33\x33"
// 其它
#define INTERLEAVE_FILL (BYTE*)"\xcc\x33\xcc\x33\xcc\x33\xcc\x33" // (对应 BGI 的 INTERLEAVE_FILL)
测试可用
关于<graphics.h>的头文件相关推荐
- linux c头文件#include<sys/types.h>和#include<fcntl.h>头文件总结
#include<sys/types.h>的介绍 是Unix/Linux系统的基本系统数据类型的头文件,含有size_t,time_t,pid_t等类型.linux编程中经常用到的头文件. ...
- 【C语言】大程序(.c和.h)头文件和源文件
参考中国大学MOOC 浙江大学翁恺C语言程序设计在线课程 定义 :产生代码 声明 :不产生代码 函数原型 变量声明 结构声明 宏声明 枚举声明 类型声明 #include <stdio.h> ...
- MAC OS下设置bits/stdc++.h万能头文件
在MAC下用atom写c++程序时用到万能头文件会比较方便. 准备: 下载xcode或者command line developer tools 地址:https://developer.apple. ...
- c语言的.h文件怎么写,c语言自己写一个.h的头文件
首先放上三段简单的源码 main.c 里面的内容 #include"stdio.h" #include "lib.h" int main(){ int a,b, ...
- C中出现:错误 C1010 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include stdafx.h”等头文件
解决方式: 错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加"#include "stdafx.h""? ...
- string/string.h/cstring头文件的区别摘要
1. #include <cstring> //不可以定义string s:可以用到strcpy等函数 using namespace std; #include <st ...
- 字符串<string.h>头文件
STRING.H 头文件 string.h 包含了 基本常见的字符串所需要的原型和声明. 下面是常用的几个str用法 strlen(s):返回字符串 s 的长度. strcpy(s1, s2):将字符 ...
- ctype.h(cctype) 头文件函数大全
代码块里是笔者认为比较常用的函数,底部的附录是对cctype头文件中所有函数的归纳. 复制到编译器中观看最佳.觉得哪行不太懂直接取消注释运行就OK了. #include <iostream> ...
- c语言 link找不到函数,link失败,找不到库函数'sqrtf',math.h的头文件已经包含...
没有发现编译选项有什么区别,如下: CASE1:link失败的console信息: make all make --no-print-directory pre-build a9-linaro-pre ...
- C语言<string.h>头文件所包含的部分函数的解析
1.strlen strlen函数的作用是求字符串的长度,传入字符串的首元素地址,返回该字符串的长度. 注意这里返回值的参数为size_t,即无符号整形,所以返回值ret也应该是size_t类型.而且 ...
最新文章
- 软件工程课程学生信息
- aspx网页背景图片设置代码_python requests,BeautifulSoup批量下载360图片
- 深入理解Spring系列之一:开篇
- 前端学习(1331):mongoose第三方模块
- .NET设计模式系列文章 [原]
- php留言板验证验证码,留言板7 图形验证码
- 《王道计算机考研》:应用层
- 使用FlyMcu ISP清除 STM32F411CE 芯片卡死
- 画出典型计算机控制系统的方框图,计算机控制系统作业参考答案
- 2021年个人年终总结
- 解决WinPcap无法安装的问题
- 基于docker 部署 canvas-lms
- Codeforces Round #672 (Div. 2) Pokémon Army
- 燃起来 ESP32移植LVGL最新版本8.2
- Unity ILRuntime Debugger使用及常见问题
- mysql start with递归_关于各个数据库递归(start with connect by prior)的相互转换
- java开发面试复试_【java开发初轮技术面试以后 复试一般问什么?】-看准网
- Failed to find provider info for xxx,Unknown URL content 的问题归因和解决办法
- 图集谷-写真集-爬虫-2.1
- CSS水平垂直居中常见方法总结(转)
热门文章
- Linux 与 Python编程2021 顺序与选择结构 educoder实训
- Python顺序与选择结构
- 各linux桌面性能比较,七大顶级桌面比较!Linux平台自由选择
- ViewPager控件之PagerAdapter适配器
- 内容付费时代,你愿意为文章付费吗?
- 微服务化的不同阶段 Kubernetes 的不同玩法
- 如何破解Word“取消文档保护”密码
- 学习笔记-应用光学 第二章 球面和球面系统
- python批量自动订票_python+splinter实现12306网站刷票并自动购票流程
- 突发!神评论:VMware公司要被英特尔“吞并”了么?