YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
文本区域。 更多...
#include <TextRenderer.h>
Public 成员函数 | |
TextRegion () | |
无参数构造。 更多... | |
template<typename... _tParams> | |
TextRegion (_tParams &&...args) | |
构造:使用指定参数确定文本状态。 更多... | |
DefDeCopyCtor (TextRegion) DefDeMoveCtor(TextRegion) TextRegion &operator | |
复制构造:默认实现。 更多... | |
ImplS (GTextRendererBase) DefGetter(const ynothrow | |
const TextState *this | ImplS (GTextRendererBase) DefGetter(ynothrow |
const TextState *this TextState *this | ImplS (GTextRendererBase) DefGetter(const ynothrow |
void | ClearLine (u16 l, SDst n) |
清除缓冲区第 l 行起始的 n 行像素。 更多... | |
void | ClearTextLine (u16) |
清除缓冲区中的指定行号的文本行。 更多... | |
void | Scroll (ptrdiff_t n) |
缓冲区特效:整体移动 n 像素。 更多... | |
void | Scroll (ptrdiff_t n, SDst h) |
缓冲区特效:整体移动 n 像素。 更多... | |
![]() | |
DeclSEntry (const TextState &GetTextState() const) DeclSEntry(TextState &GetTextState()) DeclSEntry(const Graphics &GetContext() const ) DefGetter(const | |
< 取文本状态。 更多... | |
FetchResizedLineN (static_cast< const TextRegion * >(this) ->GetTextState(), static_cast< const TextRegion * >(this) ->GetContext().GetHeight())) DefGetter(const | |
取按当前行高和行距(行间距数小于行数 1 )所能显示的最大行数。 更多... | |
![]() | |
TextState (const Drawing::Font &={}) | |
构造:使用指定字体。 更多... | |
TextState (FontCache &) | |
构造:使用指定字体缓存。 更多... | |
void | ResetPen (const Point &, const Padding &={}) |
按指定显示区域左上角位置和附加边距重新设置笔位置。 更多... | |
Public 属性 | |
const TextState | TextState |
const TextState *this TextState | TextState |
const TextState *this TextState *this const Graphics | Context |
![]() | |
u16 | |
TextLineN | |
TextLineNEx | |
![]() | |
Padding | Margin |
边距:文本区域到显示区域的距离。 更多... | |
Point | Pen |
笔坐标。 更多... | |
u8 | LineGap |
行距。 更多... | |
PDefHOp(TextState &,=, const PenStyle &ps) ImplRet(PenStyle void | ResetPen () |
赋值:笔样式。 更多... | |
Protected 成员函数 | |
void | InitializeFont () |
初始化字体。 更多... | |
![]() | |
PenStyle (const Drawing::Font &fnt={}, Drawing::Color c=Drawing::ColorSpace::White) | |
构造:使用指定字体家族、字体大小和颜色。 更多... | |
DefGetterMem (const ynothrow, const FontFamily &, FontFamily, Font) DefGetterMem(const ynothrow | |
额外继承的成员函数 | |
![]() | |
Drawing::Font | Font |
字体。 更多... | |
Drawing::Color | Color |
笔颜色。 更多... | |
FontCache | Cache |
![]() | |
SDst | GetTextLineHeightOf (const TextState &ts) |
取当前指定文本状态的字体设置对应的行高。 更多... | |
SDst | GetTextLineHeightExOf (const TextState &ts) |
取当前指定文本状态的字体设置对应的行高与行距之和。 更多... | |
u16 | GetCurrentTextLineNOf (const TextState &ts) |
取笔所在的当前行数。 更多... | |
SPos | GetTextLineBaseOf (const TextState &ts) |
取第一行的基线位置(纵坐标)。 更多... | |
void | SetPenOf (TextState &ts, SPos x, SPos y) |
设置笔位置。 更多... | |
YF_API void | SetCurrentTextLineNOf (TextState &, u16) |
设置笔的行位置。 更多... | |
void | AdjustEndOfLine (TextState &ts, const Rect &r, SDst w) |
按指定显示区域和文本区域的宽重新设置右边距。 更多... | |
void | CarriageReturn (TextState &ts) |
回车。 更多... | |
YF_API void | MovePen (TextState &, ucs4_t) |
按字符跨距移动笔。 更多... | |
YSLib::Drawing::TextRegion::TextRegion | ( | ) |
|
inlineexplicit |
void YSLib::Drawing::TextRegion::ClearLine | ( | u16 | l, |
SDst | n | ||
) |
清除缓冲区第 l 行起始的 n 行像素。
在文件 TextRenderer.cpp 第 155 行定义.
参考 YSLib::Drawing::ClearPixel(), YSLib::Drawing::g, YB_LIKELY, YB_UNLIKELY , 以及 yunseq.
参考自 ClearTextLine().
void YSLib::Drawing::TextRegion::ClearTextLine | ( | u16 | l | ) |
清除缓冲区中的指定行号的文本行。
在文件 TextRenderer.cpp 第 174 行定义.
参考 ClearLine() , 以及 YSLib::Drawing::TextState::GetTextLineHeightExOf().
YSLib::Drawing::TextRegion::DefDeCopyCtor | ( | TextRegion | ) |
复制构造:默认实现。
转移构造:默认实现。
从文本状态中恢复状态。
YSLib::Drawing::TextRegion::ImplS | ( | GTextRendererBase | ) | const |
const TextState * this YSLib::Drawing::TextRegion::ImplS | ( | GTextRendererBase | ) |
const TextState * this TextState * this YSLib::Drawing::TextRegion::ImplS | ( | GTextRendererBase | ) | const |
|
protected |
初始化字体。
在文件 TextRenderer.cpp 第 148 行定义.
参考 YSLib::Drawing::Font::DefaultSize , 以及 YSLib::Drawing::TextState::ResetPen.
参考自 TextRegion().
void YSLib::Drawing::TextRegion::Scroll | ( | ptrdiff_t | n | ) |
缓冲区特效:整体移动 n 像素。
在文件 TextRenderer.cpp 第 183 行定义.
参考 YSLib::Drawing::Padding::Bottom, YSLib::Drawing::TextState::Margin , 以及 YB_LIKELY.
void YSLib::Drawing::TextRegion::Scroll | ( | ptrdiff_t | n, |
SDst | h | ||
) |
缓冲区特效:整体移动 n 像素。
在文件 TextRenderer.cpp 第 189 行定义.
参考 YSLib::Drawing::Padding::Bottom, YSLib::Drawing::TextState::Margin, ystdex::pod_move_n(), platform_ex::Windows::s, YSLib::Drawing::Padding::Top, YB_LIKELY , 以及 yunseq.
在文件 TextRenderer.h 第 509 行定义.
const TextState YSLib::Drawing::TextRegion::TextState |
在文件 TextRenderer.h 第 506 行定义.
在文件 TextRenderer.h 第 508 行定义.