29 #include YFM_YSLib_Service_TextBase
30 #include YFM_YSLib_Service_YBlit
32 using namespace ystdex;
37 using namespace Drawing;
48 :
TextState(Drawing::
Font(fc.GetDefaultTypefacePtr()->GetFontFamily()))
52 TextState::PutNewline()
76 ts.
Pen.
Y = GetTextLineBaseOf(ts) + GetTextLineHeightExOf(ts) * n;
84 ts.
Pen.
X += ts.
Font.GetAdvance(c, sbit);
s8 GetAscender() const
取升部。
TextState(const Drawing::Font &={})
构造:使用指定字体。
yconstexpr Padding DefaultMargin(2, 2, 2, 2)
默认边距。
void MovePen(TextState &ts, ucs4_t c)
GBinaryGroup< SPos > Point
屏幕二维点(直角坐标表示)。
void SetCurrentTextLineNOf(TextState &ts, u16 n)
SPos GetTextLineBaseOf(const TextState &ts)
取第一行的基线位置(纵坐标)。
void CarriageReturn(TextState &ts)
回车。
char32_t ucs4_t
UCS-4 字符类型。
SDst GetTextLineHeightExOf(const TextState &ts)
取当前指定文本状态的字体设置对应的行高与行距之和。
PDefHOp(TextState &,=, const PenStyle &ps) ImplRet(PenStyle void ResetPen()
赋值:笔样式。