ZIPc++ easyX库官方原版下载安装包 131.69KB

a789156需要积分:3(1积分=1元)

资源文件列表:

easyx4mingw_20240601.zip 大约有9个文件
  1. include/
  2. include/easyx.h 15.8KB
  3. include/graphics.h 8KB
  4. lib-for-devcpp_5.4.0/
  5. lib-for-devcpp_5.4.0/libeasyx.a 144.69KB
  6. lib32/
  7. lib32/libeasyx.a 136.78KB
  8. lib64/
  9. lib64/libeasyx.a 177.86KB

资源介绍:

适用于c++初学者进阶使用easyX库时需要用easyX.h库,graphics.h库时不至于编译失败,适用于Dev-c++、Vs或小熊猫Dev-c++。教程在CSDN上、博客园和github上到处都有配置教程,可以自己找,我就不再此叙述啦,可参考https://*************/Dustinthewine/article/details/129431962这位大神写的教程或https://*************/weixin_61777209/article/details/124185685这篇大神写的。 easyX库使用教程请参考https://*************/qq_52661581/article/details/125124212 命令请参考https://*************/weixin_44690490/article/details/100679271 (仅转载与推荐,无恶意,望大神见谅。)
/****************************************************** * EasyX Library for C++ (Ver:20240601) * https://easyx.cn * * EasyX.h * Provides the latest API. ******************************************************/ #pragma once #ifndef WINVER #define WINVER 0x0400 // Specifies that the minimum required platform is Windows 95 and Windows NT 4.0. #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 // Specifies that the minimum required platform is Windows 2000 #endif #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 // Specifies that the minimum required platform is Windows 98 #endif #ifdef UNICODE #pragma comment(lib,"EasyXw.lib") #else #pragma comment(lib,"EasyXa.lib") #endif #ifndef __cplusplus #error EasyX is only for C++ #endif #include <windows> #include <tchar> // EasyX Window Properties #define EX_SHOWCONSOLE 1 // Maintain the console window when creating a graphics window #define EX_NOCLOSE 2 // Disable the close button #define EX_NOMINIMIZE 4 // Disable the minimize button #define EX_DBLCLKS 8 // Support double-click events // Color constant #define BLACK 0 #define BLUE 0xAA0000 #define GREEN 0x00AA00 #define CYAN 0xAAAA00 #define RED 0x0000AA #define MAGENTA 0xAA00AA #define BROWN 0x0055AA #define LIGHTGRAY 0xAAAAAA #define DARKGRAY 0x555555 #define LIGHTBLUE 0xFF5555 #define LIGHTGREEN 0x55FF55 #define LIGHTCYAN 0xFFFF55 #define LIGHTRED 0x5555FF #define LIGHTMAGENTA 0xFF55FF #define YELLOW 0x55FFFF #define WHITE 0xFFFFFF // Color conversion macro #define BGR(color) ( (((color) & 0xFF) &lt;< 16>> 16) ) class IMAGE; // Line style class class LINESTYLE { public: LINESTYLE(); LINESTYLE(const LINESTYLE &style); LINESTYLE& operator = (const LINESTYLE &style); virtual ~LINESTYLE(); DWORD style; DWORD thickness; DWORD *puserstyle; DWORD userstylecount; }; // Fill style class class FILLSTYLE { public: FILLSTYLE(); FILLSTYLE(const FILLSTYLE &style); FILLSTYLE& operator = (const FILLSTYLE &style); virtual ~FILLSTYLE(); int style; // Fill style long hatch; // Hatch pattern IMAGE* ppattern; // Fill image }; // Image class class IMAGE { public: int getwidth() const; // Get the width of the image int getheight() const; // Get the height of the image private: int width, height; // Width and height of the image HBITMAP m_hBmp; HDC m_hMemDC; float m_data[6]; COLORREF m_LineColor; // Current line color COLORREF m_FillColor; // Current fill color COLORREF m_TextColor; // Current text color COLORREF m_BkColor; // Current background color DWORD* m_pBuffer; // Memory buffer of the image LINESTYLE m_LineStyle; // Current line style FILLSTYLE m_FillStyle; // Current fill style virtual void SetDefault(); // Set the graphics environment as default public: IMAGE(int _width = 0, int _height = 0); IMAGE(const IMAGE &img); IMAGE& operator = (const IMAGE &img); virtual ~IMAGE(); virtual void Resize(int _width, int _height); // Resize image }; // Graphics window related functions HWND initgraph(int width, int height, int flag = 0); // Create graphics window void closegraph(); // Close graphics window // Graphics environment related functions void cleardevice(); // Clear device void setcliprgn(HRGN hrgn); // Set clip region void clearcliprgn(); // Clear clip region void getlinestyle(LINESTYLE* pstyle); // Get line style void setlinestyle(const LINESTYLE* pstyle); // Set line style void setlinestyle(int style, int thickness = 1, const DWORD *puserstyle = NULL, DWORD userstylecount = 0); // Set line style void getfillstyle(FILLSTYLE* pstyle); // Get fill style void setfillstyle(const FILLSTYLE* pstyle); // Set fill style void setfillstyle(int style, long hatch = NULL, IMAGE* ppattern = NULL); // Set fill style void setfillstyle(BYTE* ppattern8x8); // Set fill style void setorigin(int x, int y); // Set coordinate origin void getaspectratio(float *pxasp, float *pyasp); // Get aspect ratio void setaspectratio(float xasp, float yasp); // Set aspect ratio int getrop2(); // Get binary raster operation mode void setrop2(int mode); // Set binary raster operation mode int getpolyfillmode(); // Get polygon fill mode void setpolyfillmode(int mode); // Set polygon fill mode void graphdefaults(); // Reset the graphics environment as default COLORREF getlinecolor(); // Get line color void setlinecolor(COLORREF color); // Set line color COLORREF gettextcolor(); // Get text color void settextcolor(COLORREF color); // Set text color COLORREF getfillcolor(); // Get fill color void setfillcolor(COLORREF color); // Set fill color COLORREF getbkcolor(); // Get background color void setbkcolor(COLORREF color); // Set background color int getbkmode(); // Get background mode void setbkmode(int mode); // Set background mode // Color model transformation related functions 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); // Drawing related functions COLORREF getpixel(int x, int y); // Get pixel color void putpixel(int x, int y, COLORREF color); // Set pixel color void line(int x1, int y1, int x2, int y2); // Draw a line void rectangle (int left, int top, int right, int bottom); // Draw a rectangle without filling void fillrectangle (int left, int top, int right, int bottom); // Draw a filled rectangle with a border void solidrectangle(int left, int top, int right, int bottom); // Draw a filled rectangle without a border void clearrectangle(int left, int top, int right, int bottom); // Clear a rectangular region void circle (int x, int y, int radius); // Draw a circle without filling void fillcircle (int x, int y, int radius); // Draw a filled circle with a border void solidcircle(int x, int y, int radius); // Draw a filled circle without a border void clearcircle(int x, int y, int radius); // Clear a circular region void ellipse (int left, int top, int right, int bottom); // Draw an ellipse without filling void fillellipse (int left, int top, int right, int bottom); // Draw a filled ellipse with a border void solidellipse(int left, int top, int right, int bottom); // Draw a filled ellipse without a border void clearellipse(int left, int top, int right, int bottom); // Clear an elliptical region void roundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a rounded rectangle without filling void fillroundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a filled rounded rectangle with a border void solidroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a filled rounded rectangle without a border void clearroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Clear a rounded rectangular region void arc (int left, int top, int right, int bottom, double stangle, double endangle); // Draw an arc void pie (int left, int top, int right, int bottom, double stangle, double endangle); // Draw a sector without filling void fillpie (int left, int top, int right, int bottom, double stangle, double endangle); // Draw a filled sector with a border void solidpie(int left, int top, int right, int bottom, double stangle, double endangle); // Draw a filled sector without a border void clearpie(int left, int top, int right, int bottom, double stangle, double endangle); // Clear a rounded rectangular region void
100+评论
captcha
    类型标题大小时间
    PDF2024华为秋招天线笔试16.43MB2周前
    RAR基于Java的校园二手交易平台的设计与实现【附源码】12.37MB2周前
    ZIP杰理JL701N-SDK源代码39.8MB2周前
    ZIP基于Hadoop大数据技术的热门旅游景点推荐数据分析与可视化系统(基于Django大数据技术热门旅游景点数据分析与可视化系统)17.57MB2周前
    RARYS9082HP-MPToolV8.00.00.00.012-FW210520-release-B37&B47.rar5.06MB2周前
    RAR小天才电话手表通用刷机工具36.27MB2周前
    ZIPSTM32F103C8T6驱动步进电机11.99MB2周前
    ZIPyolo-world官方代码,预测 + 训练6.34MB2周前