|
dl
|
#include <dl_text.h>
类 | |
| struct | Layout |
| 布局属性 更多... | |
Public 成员函数 | |
| void | Render () |
| 绘制 更多... | |
| void | SetFormat (bool open) |
| 设置是否要格式化字符串(默认为否) 更多... | |
| void | SetLayoutAlign (Align::Direction dir_h) |
| 设置布局属性(单行而已) 更多... | |
| void | SetPositionAlign (const Position &pos={}, const Align::Direction2 &dir={ Align::Direction::BACK, Align::Direction::BACK }) |
| 设置Coor位置,来整体对齐 更多... | |
| void | SetPositionAlign (const Position &pos, Align::Direction dir_v) |
| void | SetCenter (const Position &pos={}) |
| 设置Coor位置,并根据整体大小居中 更多... | |
| void | SetMaxW (unsigned w) |
| 设置自动换行宽度,0为不自动换行 更多... | |
| void | SetLineSpacing (Float k) |
| 设置行间距,默认为1.0 更多... | |
| const Layout & | GetLayout () |
| void | SetOrder (float order) |
| 设置绘制顺序 更多... | |
| void | SetColor (const Color &col, TextParam type=TextParam::NORMAL) |
| 设置颜色 更多... | |
| void | SetString (std::string_view str) |
| 设置内容 更多... | |
| void | SetFontId (std::size_t id) |
| 设置字体id 更多... | |
| void | SetFontSize (unsigned size) |
| 设置字体大小 更多... | |
| void | SetOutline (unsigned outline, const Color &color=ColorDef::BLACK) |
| 设置描边属性 更多... | |
| void | SetShadow (unsigned shadow, const Color &color=ColorDef::BLACK) |
| 设置阴影属性 更多... | |
| void | SetBackground (bool open, const Color &col=ColorDef::TEXT_BG) |
| 设置背景精灵 更多... | |
| void | SetBackground (Text *b) |
| 注意传入gcText会调用上面的重载 更多... | |
| Coor * | GetCoor () |
| 返回坐标系 更多... | |
| float | GetOrder () |
| std::string | GetString () |
| Color | GetColor (TextParam type=TextParam::NORMAL) |
| Size | GetSize () |
| 返回区域大小 更多... | |
| unsigned | GetFontSize (TextParam type=TextParam::NORMAL) |
| 返回字体大小 更多... | |
| bool | IsPickup () |
| 是否被光标选中 更多... | |
| ~Text () | |
友元 | |
| class | Factory |
| class | PoolList< Text > |
| dl::Text::~Text | ( | ) |
|
inline |
|
inline |
|
inline |
| std::string dl::Text::GetString | ( | ) |
| bool dl::Text::IsPickup | ( | ) |
是否被光标选中
| void dl::Text::Render | ( | ) |
绘制
| void dl::Text::SetBackground | ( | bool | open, |
| const Color & | col = ColorDef::TEXT_BG |
||
| ) |
设置背景精灵
| void dl::Text::SetCenter | ( | const Position & | pos = {} | ) |
设置Coor位置,并根据整体大小居中
| void dl::Text::SetColor | ( | const Color & | col, |
| TextParam | type = TextParam::NORMAL |
||
| ) |
设置颜色
| void dl::Text::SetFontId | ( | std::size_t | id | ) |
设置字体id
| void dl::Text::SetFontSize | ( | unsigned | size | ) |
设置字体大小
|
inline |
| void dl::Text::SetOrder | ( | float | order | ) |
设置绘制顺序
| void dl::Text::SetOutline | ( | unsigned | outline, |
| const Color & | color = ColorDef::BLACK |
||
| ) |
设置描边属性
|
inline |
|
inline |
| void dl::Text::SetShadow | ( | unsigned | shadow, |
| const Color & | color = ColorDef::BLACK |
||
| ) |
设置阴影属性
| void dl::Text::SetString | ( | std::string_view | str | ) |
设置内容
| [in] | str | 要设置的内容 |