69 StrikeThrough = 1 << 3
93 Text(
const Font&& font,
String string =
"",
unsigned int characterSize = 30) =
delete;
410 void ensureGeometryUpdate()
const;
416 const Font* m_font{};
417 unsigned int m_characterSize{30};
418 float m_letterSpacingFactor{1.f};
419 float m_lineSpacingFactor{1.f};
420 std::uint32_t m_style{Regular};
421 Color m_fillColor{Color::White};
422 Color m_outlineColor{Color::Black};
423 float m_outlineThickness{0.f};
424 mutable VertexArray m_vertices{PrimitiveType::Triangles};
425 mutable VertexArray m_outlineVertices{PrimitiveType::Triangles};
427 mutable bool m_geometryNeedUpdate{};
428 mutable std::uint64_t m_fontTextureId{};
#define SFML_GRAPHICS_API
Utility class for manipulating RGBA colors.
Abstract base class for objects that can be drawn to a render target.
Class for loading and manipulating character fonts.
Base class for all render targets (window, texture, ...)
Utility string class that automatically handles conversions between types and encodings.
Graphical text that can be drawn to a render target.
const Font & getFont() const
Get the text's font.
float getLetterSpacing() const
Get the size of the letter spacing factor.
Text(const Font &font, String string="", unsigned int characterSize=30)
Construct the text from a string, font and size.
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.
void setFillColor(Color color)
Set the fill color of the text.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
unsigned int getCharacterSize() const
Get the character size.
void setFont(const Font &&font)=delete
Disallow setting from a temporary font.
float getLineSpacing() const
Get the size of the line spacing factor.
void setOutlineColor(Color color)
Set the outline color of the text.
void setString(const String &string)
Set the text's string.
std::uint32_t getStyle() const
Get the text's style.
void setStyle(std::uint32_t style)
Set the text's style.
Style
Enumeration of the string drawing styles.
Color getOutlineColor() const
Get the outline color of the text.
void setOutlineThickness(float thickness)
Set the thickness of the text's outline.
const String & getString() const
Get the text's string.
void setLetterSpacing(float spacingFactor)
Set the letter spacing factor.
FloatRect getGlobalBounds() const
Get the global bounding rectangle of the entity.
Text(const Font &&font, String string="", unsigned int characterSize=30)=delete
Disallow construction from a temporary font.
Color getFillColor() const
Get the fill color of the text.
void setCharacterSize(unsigned int size)
Set the character size.
void setLineSpacing(float spacingFactor)
Set the line spacing factor.
float getOutlineThickness() const
Get the outline thickness of the text.
Define the states used for drawing to a RenderTarget