25 #ifndef CPP3DS_TEXT_HPP
26 #define CPP3DS_TEXT_HPP
31 #include <cpp3ds/Graphics/Drawable.hpp>
32 #include <cpp3ds/Graphics/Transformable.hpp>
33 #include <cpp3ds/Graphics/Font.hpp>
34 #include <cpp3ds/Graphics/Rect.hpp>
35 #include <cpp3ds/Graphics/VertexArray.hpp>
36 #include <cpp3ds/System/String.hpp>
79 Text(
const String&
string,
const Font& font,
unsigned int characterSize = 30);
267 void setPosition(
float x,
float y);
268 void setPosition(
const Vector2f& position);
288 void ensureGeometryUpdate()
const;
295 unsigned int m_characterSize;
300 mutable bool m_geometryNeedUpdate;
Class for loading and manipulating character fonts.
const Font * getFont() const
Get the text's font.
void setColor(const Color &color)
Set the global color of the text.
Utility string class that automatically handles conversions between types and encodings.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
Style
Enumeration of the string drawing styles.
void setFont(const Font &font)
Set the text's font.
const Color & getColor() const
Get the global color of the text.
Utility class for manpulating RGBA colors.
Vector2f findCharacterPos(std::size_t index) const
Return the position of the index-th character.
Define a set of one or more 2D primitives.
void setCharacterSize(unsigned int size)
Set the character size.
void setString(const String &string)
Set the text's string.
Graphical text that can be drawn to a render target.
Abstract base class for objects that can be drawn to a render target.
Utility template class for manipulating 2-dimensional vectors.
void setStyle(Uint32 style)
Set the text's style.
Base class for all render targets (window, texture, ...)
Define the states used for drawing to a RenderTarget.
const String & getString() const
Get the text's string.
FloatRect getGlobalBounds() const
Get the global bounding rectangle of the entity.
Uint32 getStyle() const
Get the text's style.
Regular characters, no style.
unsigned int getCharacterSize() const
Get the character size.
Text()
Default constructor.