Leistungsstarkes Game Framework
The game framework based on game framework by Woei Kae Chen
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
game_framework::CTextDraw Class Reference

#include <gameutil.h>

Static Public Member Functions

static void Print (CDC *pdc, int x, int y, string str)
 在畫面上印出文字。
 
static void ChangeFontLog (CDC *pdc, int size, string fontName, COLORREF fontColor, int weight=500)
 設定當前文字的屬性。
 

Member Function Documentation

◆ ChangeFontLog()

void game_framework::CTextDraw::ChangeFontLog ( CDC *  pDC,
int  size,
string  fontName,
COLORREF  fontColor,
int  weight = 500 
)
static

設定當前文字的屬性。

我們將 pDC 取得的責任交給 caller,你必須要取得當前的 pDC 指標,然後記得釋放。 此設定會在設定的 pDC 指標被釋放時失去設定值。

Parameters
pDC,一個CDC 指標,可使用 CDDraw::GetBackCDC() 取得。
size文字的大小(以 pt 為單位,但因技術有限,並不一定會完全符合 pt 為單位的大小)
fontName字體名稱
fontColor字體顏色
weight字體粗度(預設為 500)

◆ Print()

void game_framework::CTextDraw::Print ( CDC *  pDC,
int  x,
int  y,
string  str 
)
static

在畫面上印出文字。

我們將 pDC 取得的責任交給 caller,你必須要取得當前的 pDC 指標,然後記得釋放。

Parameters
pDC,一個CDC 指標,可使用 CDDraw::GetBackCDC() 取得。
x文字顯示的左上角 x 座標
y文字顯示的左上角 y 座標
str欲顯示的文字

The documentation for this class was generated from the following files: