实体
字体 CFont
查看 Markdown游戏内置字绘制与测宽
CFont.h
游戏内置字。画在 drawingEvent。更省事可用 gamefont 扩展。
static void SetScale(float w, float h);
static void SetColor(CRGBA color);
static void SetAlphaFade(float alpha);static void SetFontStyle(short style);
static void SetOrientation(eFontAlignment alignment);
static void SetJustify(bool on);
static void SetCentreSize(float value);
static void SetWrapx(float value);
static void SetProportional(bool on);static void SetDropColor(CRGBA color);
static void SetDropShadowPosition(short value);
static void SetEdge(short value);static void SetBackground(bool enable, bool includeWrap);
static void SetBackgroundColor(CRGBA color);static void PrintString(float x, float y, const char* text);
static void PrintStringFromBottom(float x, float y, const char* text);
static void PrintChar(float x, float y, char character);static float GetStringWidth(const char* string, bool spaces, bool scriptValues = false);
static void GetTextRect(CRect* rect, float x, float y, const char* text);一般引擎已调;自管缓冲时才碰。
static void InitPerFrame();
static void RenderFontBuffer();
static void DrawFonts();屏幕坐标用 Screen。
评论