88 Text(
const String&
string,
const Font& font,
unsigned int characterSize = 30);
380 void ensureGeometryUpdate()
const;
387 unsigned int m_characterSize;
390 Color m_outlineColor;
391 float m_outlineThickness;
395 mutable bool m_geometryNeedUpdate;
#define SFML_GRAPHICS_API
Utility class for manipulating RGBA colors.
Abstract base class for objects that can be drawn to a render target.
friend class RenderTarget
Class for loading and manipulating character fonts.
Define the states used for drawing to a RenderTarget.
Utility string class that automatically handles conversions between types and encodings.
Uint32 getStyle() const
Get the text's style.
const Color & getFillColor() const
Get the fill color of the text.
void setFont(const Font &font)
Set the text's font.
Vector2f findCharacterPos(std::size_t index) const
Return the position of the index-th character.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
unsigned int getCharacterSize() const
Get the character size.
Text(const String &string, const Font &font, unsigned int characterSize=30)
Construct the text from a string, font and size.
void setString(const String &string)
Set the text's string.
void setOutlineColor(const Color &color)
Set the outline color of the text.
Style
Enumeration of the string drawing styles.
@ Regular
Regular characters, no style.
@ Underlined
Underlined characters.
@ StrikeThrough
Strike through characters.
@ Italic
Italic characters.
void setOutlineThickness(float thickness)
Set the thickness of the text's outline.
const String & getString() const
Get the text's string.
const Color & getColor() const
Get the fill color of the text.
void setFillColor(const Color &color)
Set the fill color of the text.
FloatRect getGlobalBounds() const
Get the global bounding rectangle of the entity.
void setStyle(Uint32 style)
Set the text's style.
const Font * getFont() const
Get the text's font.
const Color & getOutlineColor() const
Get the outline color of the text.
void setCharacterSize(unsigned int size)
Set the character size.
float getOutlineThickness() const
Get the outline thickness of the text.
void setColor(const Color &color)
Set the fill color of the text.
Text()
Default constructor.
Define a set of one or more 2D primitives.
Vector2< float > Vector2f