Used to contain text objects. This class is required for the Text object to operate.
Definition TextBuffer.hpp:17
A class used to handle the transformation and drawing of visible text.
Definition Text.hpp:31
void setString(std::string str)
Sets the text's string.
Definition Text.cpp:28
void setColor(const dl::Color &color)
Sets the color of the text.
Definition Text.cpp:77
void setOrigin(const dl::Vector2f &origin)
Sets the origin of the shape. The default origin is (0,0) and is the top left pixel of the shape boun...
Definition Text.cpp:40
void setScale(const dl::Vector2f &scale)
Sets the scale of the text.
Definition Text.cpp:51
void draw(const dl::Vector2f &viewOffset) override
Draws the drawable to the screen.
Definition Text.cpp:21
void setAlignment(TextAlignment alignment)
Sets the alignment of the text.
Definition Text.cpp:72
const std::string & getString()
Definition Text.cpp:35
const dl::Vector2f & getScale()
Definition Text.cpp:62
void updateDynamicText()
reparses and reoptimizes the text. This should be used if you call TextBuffer::flushBuffer beforehand...
Definition Text.cpp:67
const dl::Vector2f & getOrigin()
Definition Text.cpp:57