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

📄 dxfont.h

📁 load .x file to application
💻 H
字号:
#if !defined(DXFONT_H)
#define DXFONT_H


#include <d3dx9.h>

//--------------------------------------------------------------------------------------
// Used for drawing fonts. THe cpp file contains all the code explanations and a little
// "font theroy"
//--------------------------------------------------------------------------------------
class CDXFont  
{
public:
	CDXFont();
	virtual ~CDXFont();

    bool InitializeFont(IDirect3DDevice9* pDevice, char* strFontName, int iFontSize);
    void DestroyFont();
    bool Begin();
    void End();
    bool Print(char* strText, int iXPos = 0, int iYPos = 0);

    void SetFontColor(DWORD dwColor);

    bool Invalidate();
    bool Restore();

    static bool RestoreFontSprite();
    static bool InvalidateFontSprite();

private:

	static ID3DXSprite*	m_pSprite;
	bool				m_bSpriteDeleted;
    ID3DXFont*          m_pFont;
    IDirect3DDevice9*   m_pD3DDevice;
    DWORD               m_dwColor;

};

#endif 


//////////////////////////////////////////////////////////////////////////////////////////////
// This file is copyright 

⌨️ 快捷键说明

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