|
libdonut 2.3.6
Application framework for cross-platform game development in C++20
|
Configuration of a 2D instance of a string of text with a Font, for drawing as part of a RenderPass. More...
#include <donut/graphics/RenderPass.hpp>
Public Attributes | |
| Shader2D * | shader = Shader2D::ALPHA |
| Non-owning pointer to the shader to use when rendering the glyphs of this text. | |
| Font * | font |
| Non-owning pointer to the font from which to shape the text. | |
| u32 | characterSize |
| Character size to shape the glyphs at. | |
| vec2 | position {0.0f, 0.0f} |
| Starting position, in world coordinates, to render the text at. | |
| vec2 | scale {1.0f, 1.0f} |
| Scaling to apply to the size of the shaped glyphs. | |
| vec2 | origin {0.0f, 0.0f} |
| Offset, in normalized coordinates, specifying the origin relative to the baseline of the first line of text. | |
| Color | color = Color::WHITE |
| Base text color. | |
| std::string_view | string |
| String to shape the text from. | |
Configuration of a 2D instance of a string of text with a Font, for drawing as part of a RenderPass.
Required fields:
| Shader2D* donut::graphics::TextStringInstance::shader = Shader2D::ALPHA |
Non-owning pointer to the shader to use when rendering the glyphs of this text.
| Font* donut::graphics::TextStringInstance::font |
Non-owning pointer to the font from which to shape the text.
| u32 donut::graphics::TextStringInstance::characterSize |
Character size to shape the glyphs at.
| vec2 donut::graphics::TextStringInstance::position {0.0f, 0.0f} |
Starting position, in world coordinates, to render the text at.
This will be the first position on the baseline of the first line of text.
| vec2 donut::graphics::TextStringInstance::scale {1.0f, 1.0f} |
Scaling to apply to the size of the shaped glyphs.
The result is affected by FontOptions::useLinearFiltering.
| vec2 donut::graphics::TextStringInstance::origin {0.0f, 0.0f} |
Offset, in normalized coordinates, specifying the origin relative to the baseline of the first line of text.
For example, a value of (0.5, 0.5) would represent the middle of the first line of text.
| Color donut::graphics::TextStringInstance::color = Color::WHITE |
Base text color.
| std::string_view donut::graphics::TextStringInstance::string |
String to shape the text from.
The string will be interpreted as containing UTF-8-encoded text.