📄 fonttexture.h
字号:
//--------------------------------------------------
// Desc: Font Texture 512*32
// Date: 2006.11.02 /update
// Author: artsylee
//
// Copyright (C) 2006 artsylee
//
// 扩展: 可变大小的字体纹理(2006_11_21)
//
//--------------------------------------------------
#ifndef _FONTTEXTURE_
#define _FONTTEXTURE_
#include "Texture.h"
#define FONT_TEXTURE_WIDTH 512
#define FONT_TEXTURE_HEIGHT 32
#define MAX_FONT_TEXTURE 32
struct BMPInfo
{
HBITMAP m_hBitMap;
void *m_pData;
HDC m_hDC;
};
class ASE_DLL CFontTexture : public CTexture
{
public:
CFontTexture();
virtual ~CFontTexture();
void Release();
void CreateFontTexture(int width, int height);
void WriteString(const char *szText, HFONT hFont);
void Clear();
bool Compare(const char *szText) const;
bool IsEmpty() const;
protected:
std::string m_szText;
bool m_bEmpty;
bool m_bInit;
BMPInfo m_BmpInfo;
};
#endif // _FONTTEXTURE_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -