⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ew_vxworksdrawinterface.h

📁 基于Windml2.0的窗口系统原代码 , 以及和MFC CDC兼容的CDC
💻 H
字号:
#ifndef EW_VxworksDrawInterface_H_
#define EW_VxworksDrawInterface_H_
#include "EW_OSDrawInterface.h"

class EW_VxworksDrawInterface : public EW_OSDrawInterface
{
public:
	EW_VxworksDrawInterface(int nScreenWidth , int nScreenHeight);
	virtual ~EW_VxworksDrawInterface();
	
public:
    void BeginDraw(const EW_Rect & rect);

    void EndDraw();
    
    void FillRect(const EW_Rect & rect, const COLORREF ForeColor, const COLORREF background);

    void Line(const short x1, const short y1, const short x2, const short y2, const COLORREF color);

    void DrawText(const char * Text, const short x, const short y, const COLORREF color);
    
    void DrawTextW(const char * Text, const short x, const short y, const COLORREF color);

    WORD GetTextWidth(const char * Text);

    WORD GetTextHeight(const char * Text);

    void DrawBitmap(const char * pBmpName, const short x1, const short y1);

    void DrawPolyLine(const short n, const EW_Point * vert, const COLORREF color);

    void DrawDotRect(const EW_Rect & rect, const COLORREF color);	
    
    CDC *GetDC(); 
    
    CDC *GetMemDC();

private:    
    //用来给屏幕绘图的CDC    
    CDC	*m_pDC;       
    
    //绘图缓冲区位图    
	CBitmap *m_pBitmap;
	
	//绘图缓冲区CDC
    CDC *m_pMemDC; 
    
    //屏幕宽度
    int m_nScreenWidth ;
    
    //屏幕高度
    int m_nScreenHeight ;
};   
#endif //EW_VxworksDrawInterface_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -