ew_vxworksdrawinterface.h

来自「基于Windml2.0的窗口系统原代码 , 以及和MFC CDC兼容的CDC」· C头文件 代码 · 共 55 行

H
55
字号
#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 + =
减小字号Ctrl + -
显示快捷键?