|
YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
文本区域。 更多...
#include <TextRenderer.h>


Public 成员函数 | |
| TextRegion () | |
| 无参数构造。 | |
| template<typename... _tParams> | |
| TextRegion (_tParams &&...args) | |
| 构造:使用指定参数确定文本状态。 | |
| TextRegion (const TextRegion &)=default | |
| 复制构造:默认实现。 | |
| TextRegion (TextRegion &&)=default | |
| 转移构造:默认实现。 | |
| TextRegion & | operator= (const TextState &ts) |
| 从文本状态中恢复状态。 | |
| TextRegion & | operator= (const TextRegion &)=default |
| 复制赋值:默认实现。 | |
| TextRegion & | operator= (TextRegion &&)=default |
| 转移赋值:默认实现。 | |
| void | operator() (ucs4_t) |
| 渲染单个字符。 | |
| const TextState & | GetTextState () const ynothrow |
| TextState & | GetTextState () ynothrow |
| const Graphics & | GetContext () 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 像素。 | |
Public 成员函数 继承自 YSLib::Drawing::GTextRendererBase< TextRegion > | |
| u16 | GetTextLineN () const |
| 取按当前行高和行距所能显示的最大行数。 | |
| u16 | GetTextLineNEx () const |
| 取按当前行高和行距(行间距数小于行数 1 )所能显示的最大行数。 | |
Public 成员函数 继承自 YSLib::Drawing::TextState | |
| TextState (const Drawing::Font &={}) | |
| 构造:使用指定字体。 | |
| TextState (FontCache &) | |
| 构造:使用指定字体缓存。 | |
| TextState & | operator= (const PenStyle &ps) |
| 赋值:笔样式。 | |
| TextState & | operator= (const Padding &ms) |
| 赋值:边距。 | |
| void | PutNewline () |
| 打印换行。 | |
| void | ResetPen () |
| 复位笔:按字体大小设置笔位置为默认位置。 | |
| void | ResetPen (const Point &, const Padding &={}) |
| 按指定显示区域左上角位置和附加边距重新设置笔位置。 | |
Public 成员函数 继承自 YSLib::Drawing::BitmapBufferEx | |
| BitmapBufferEx () | |
| 无参数构造。 | |
| BitmapBufferEx (ConstBitmapPtr, SDst, SDst) | |
| 构造:使用指定位图指针和大小。 | |
| BitmapBufferEx (const BitmapBufferEx &) | |
| BitmapBufferEx (BitmapBufferEx &&) ynothrow | |
| 转移构造:转移资源。 | |
| ~BitmapBufferEx () override | |
| 析构:释放资源。 | |
| BitmapBufferEx & | operator= (const BitmapBufferEx &buf) |
| BitmapBufferEx & | operator= (BitmapBufferEx &&buf) ynothrow |
| u8 * | GetBufferAlphaPtr () const ynothrow |
| 取 Alpha 缓冲区的指针。 | |
| size_t | GetSizeOfBufferAlpha () const ynothrow |
| 取 Alpha 缓冲区占用空间。 | |
| void | SetSize (SDst, SDst) override |
| 重新设置缓冲区大小。 | |
| void | ClearImage () const override |
| 清除缓冲区。 | |
| BitmapBufferEx * | Clone () const override |
| void | Swap (BitmapBufferEx &buf) ynothrow |
Public 成员函数 继承自 YSLib::Drawing::BitmapBuffer | |
| BitmapBuffer ()=default | |
| 无参数构造:默认实现。 | |
| BitmapBuffer (ConstBitmapPtr, SDst, SDst) | |
| 构造:使用指定位图指针和大小。 | |
| BitmapBuffer (const BitmapBuffer &) | |
| BitmapBuffer (BitmapBuffer &&) ynothrow | |
| 转移构造:转移资源。 | |
| virtual | ~BitmapBuffer () |
| 析构:释放资源。 | |
| BitmapBuffer & | operator= (const BitmapBuffer &buf) |
| BitmapBuffer & | operator= (BitmapBuffer &&buf) ynothrow |
| void | SetContent (ConstBitmapPtr, SDst, SDst) |
| 设置内容。 | |
| void | SetSizeSwap () |
| 交换宽和高;同时清除缓冲区。 | |
| void | Swap (BitmapBuffer &buf) ynothrow |
| const Graphics & | GetContext () const ynothrow |
Protected 成员函数 | |
| void | InitializeFont () |
| 初始化字体。 | |
额外继承的成员函数 | |
Public 属性 继承自 YSLib::Drawing::TextState | |
| Padding | Margin |
| 边距:文本区域到显示区域的距离。 | |
| Point | Pen |
| 笔坐标。 | |
| u8 | LineGap |
| 行距。 | |
Protected 属性 继承自 YSLib::Drawing::PenStyle | |
| Drawing::Font | Font |
| 字体。 | |
| Drawing::Color | Color |
| 笔颜色。 | |
Protected 属性 继承自 YSLib::Drawing::BitmapBufferEx | |
| u8 * | pBufferAlpha |
| Alpha 缓冲区指针。 | |
静态 Protected 属性 继承自 YSLib::Drawing::Graphics | |
| static const Graphics | Invalid |
| 无效图形接口上下文。 | |
| TextRegion::TextRegion | ( | ) |
|
inlineexplicit |
|
default |
复制构造:默认实现。
|
default |
转移构造:默认实现。
| void TextRegion::ClearLine | ( | u16 | l, |
| SDst | n | ||
| ) |
清除缓冲区第 l 行起始的 n 行像素。
在文件 TextRenderer.cpp 第 130 行定义.
参考 YSLib::Drawing::ClearPixel(),GetContext(),YSLib::Drawing::BitmapBufferEx::pBufferAlpha,YB_LIKELY,YB_UNLIKELY , 以及 yunseq().
参考自 ClearTextLine().


| void TextRegion::ClearTextLine | ( | u16 | l | ) |
清除缓冲区中的指定行号的文本行。
在文件 TextRenderer.cpp 第 149 行定义.
参考 ClearLine(),YSLib::Drawing::GetTextLineHeightExOf(),GetTextState() , 以及 h.

|
inline |
|
inline |
|
inline |
在文件 TextRenderer.h 第 450 行定义.
|
protected |
初始化字体。
在文件 TextRenderer.cpp 第 123 行定义.
参考 YSLib::Drawing::Font::DefaultSize,YSLib::Drawing::TextState::ResetPen() , 以及 YSLib::Drawing::Font::SetSize().
参考自 TextRegion().


| void TextRegion::operator() | ( | ucs4_t | c | ) |
渲染单个字符。
在文件 TextRenderer.cpp 第 115 行定义.
参考 YSLib::Drawing::BitmapBufferEx::GetBufferAlphaPtr(),GetContext(),YSLib::Drawing::Graphics::GetSize(),GetTextState() , 以及 YSLib::Drawing::TextState::Margin.

|
inline |
从文本状态中恢复状态。
在文件 TextRenderer.h 第 426 行定义.
|
default |
复制赋值:默认实现。
|
default |
转移赋值:默认实现。
| void TextRegion::Scroll | ( | ptrdiff_t | n | ) |
缓冲区特效:整体移动 n 像素。
在文件 TextRenderer.cpp 第 158 行定义.
参考 YSLib::Drawing::Padding::Bottom,YSLib::Drawing::Graphics::GetHeight(),YSLib::Drawing::TextState::Margin , 以及 YB_LIKELY.

| void TextRegion::Scroll | ( | ptrdiff_t | n, |
| SDst | h | ||
| ) |
缓冲区特效:整体移动 n 像素。
在文件 TextRenderer.cpp 第 164 行定义.
参考 YSLib::Drawing::Padding::Bottom,YSLib::Drawing::Graphics::GetHeight(),YSLib::Drawing::Graphics::GetWidth(),YSLib::Drawing::TextState::Margin,YSLib::Drawing::Graphics::pBuffer,YSLib::Drawing::BitmapBufferEx::pBufferAlpha,ystdex::pod_move_n(),YSLib::Drawing::Padding::Top,YB_LIKELY , 以及 yunseq().
