Renders formatted text within a geometry region.
More...
#include <spk_text_region.hpp>
Renders formatted text within a geometry region.
- See also
- Font
Renders formatted text within a geometry region.
Definition spk_text_region.hpp:24
const std::wstring & text() const
Returns the current text content.
Definition spk_text_region.cpp:144
◆ computeTextSize()
Computes the text size using current font settings.
- Returns
- Size in pixels.
◆ font()
Returns the current font pointer.
- Returns
- Font pointer.
◆ fontSize()
Returns the current font size.
- Returns
- Font size.
◆ geometry()
Returns the current render geometry.
- Returns
- Render geometry.
◆ glyphColor()
| const spk::Color & spk::TextRegion::glyphColor |
( |
| ) |
const |
Returns the glyph fill color.
- Returns
- Glyph color.
◆ horizontalAlignment()
| HorizontalAlignment spk::TextRegion::horizontalAlignment |
( |
| ) |
const |
Returns the horizontal alignment setting.
- Returns
- Horizontal alignment.
◆ layer()
| const float & spk::TextRegion::layer |
( |
| ) |
const |
Returns the current layer value.
- Returns
- Layer value.
◆ outlineColor()
| const spk::Color & spk::TextRegion::outlineColor |
( |
| ) |
const |
Returns the glyph outline color.
- Returns
- Outline color.
◆ setAlignment()
| void spk::TextRegion::setAlignment |
( |
HorizontalAlignment | p_horizontalAlignment, |
|
|
VerticalAlignment | p_verticalAlignment ) |
Sets text alignment within the region.
- Parameters
-
| p_horizontalAlignment | Horizontal alignment. |
| p_verticalAlignment | Vertical alignment. |
◆ setColors()
| void spk::TextRegion::setColors |
( |
const spk::Color & | p_glyphColor, |
|
|
const spk::Color & | p_outlineColor ) |
Sets glyph and outline colors together.
- Parameters
-
| p_glyphColor | Glyph color. |
| p_outlineColor | Outline color. |
◆ setFont()
| void spk::TextRegion::setFont |
( |
spk::Font * | p_font | ) |
|
Sets the font used for rendering.
- Parameters
-
| p_font | Font pointer to use. |
◆ setFontSize()
Sets the font size used for rendering.
- Parameters
-
◆ setGeometry()
| void spk::TextRegion::setGeometry |
( |
const spk::Extend2D & | p_geometry | ) |
|
Sets the geometry used to render the text.
- Parameters
-
| p_geometry | Render geometry. |
◆ setGlyphColor()
| void spk::TextRegion::setGlyphColor |
( |
const spk::Color & | p_color | ) |
|
Sets the glyph fill color.
- Parameters
-
◆ setLayer()
| void spk::TextRegion::setLayer |
( |
const float & | p_layer | ) |
|
Sets the rendering layer.
- Parameters
-
◆ setOutlineColor()
| void spk::TextRegion::setOutlineColor |
( |
const spk::Color & | p_color | ) |
|
Sets the glyph outline color.
- Parameters
-
◆ setText()
| void spk::TextRegion::setText |
( |
const std::wstring & | p_text | ) |
|
Sets the text content.
- Parameters
-
◆ text()
| const std::wstring & spk::TextRegion::text |
( |
| ) |
const |
Returns the current text content.
- Returns
- Text string.
◆ verticalAlignment()
| VerticalAlignment spk::TextRegion::verticalAlignment |
( |
| ) |
const |
Returns the vertical alignment setting.
- Returns
- Vertical alignment.
The documentation for this class was generated from the following files:
- includes/structure/widget/components/spk_text_region.hpp
- srcs/structure/widget/components/spk_text_region.cpp