dxfont.h
来自「load .x file to application」· C头文件 代码 · 共 45 行
H
45 行
#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 + =
减小字号Ctrl + -
显示快捷键?