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

📄 glfont.h

📁 Font class which can create, destroy and manage font
💻 H
字号:
#ifndef __GLFONT_H__
#define __GLFONT_H__

#include <windows.h>
#include "types.h"

class CGLFont
{
protected:
	unsigned fontOffset;
public:
	CGLFont(char* fontFace, int width, int height, int weight);
	CGLFont();
	void SetFont(HDC hDC, char* fontFace, int width, int height, int weight);
	~CGLFont();
	void put(float x, float y, float z, const char* str, const RGBColor& textColor, unsigned int len = -1);
	void putHighlighted(float x, float y, float z, const char* str, int sHighlight, int fHighlight, int charCnt, const RGBColor& textColor, const RGBColor& bgColor);
	void GetTextSize(const char* str, unsigned int len, TSize& size);
	int GetSymbolCnt(const char* str, unsigned int len, unsigned int pixels, TSize& size);
	void WrapText(const char* text, int len , int area, TIntVec& wrapPos);
	HDC hDC;
};

#endif

⌨️ 快捷键说明

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