glfont.h

来自「Font class which can create, destroy and」· C头文件 代码 · 共 24 行

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