36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
116 Text(std::string string,
Font& font,
unsigned characterSize = 30);
162 return m_characterSize;
239 return m_outlineColor;
261 return m_outlineThickness;
281 return m_paragraphWidth;
354 void updateGeometry();
358 std::vector<std::u32string> words;
360 float spacing = 0.0f;
364 std::vector<Line> lines;
367 float getWordWidth(
const std::u32string& word);
369 std::vector<Paragraph> makeParagraphs(
const std::string& str,
float spaceWidth);
372 std::string m_string;
374 unsigned m_characterSize;
380 float m_outlineThickness;
383 float m_paragraphWidth;
387 #ifndef DOXYGEN_SHOULD_SKIP_THIS
void setAnchor(Anchor anchor)
Set the anchor origin of the entity.
float getOutlineThickness()
Get the outline thickness of the text.
Definition: Text.h:260
void setColor(const Color4f &color)
Set the fill color of the text.
void setFont(Font &font)
Set the text's font.
A set of primitives.
Definition: VertexArray.h:65
Text()
Default constructor.
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:65
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:81
const Color4f & getColor() const
Get the fill color of the text.
Definition: Text.h:216
unsigned getCharacterSize() const
Get the character size.
Definition: Text.h:161
virtual void draw(RenderTarget &target, RenderStates states) override
Draw the object to a render target.
Data in the graphics memory.
Definition: VertexBuffer.h:70
void setOutlineThickness(float thickness)
Set the thickness of the text's outline.
RectF getLocalBounds() const
Get the local bounding rectangle of the entity.
Definition: Text.h:315
void setOutlineColor(const Color4f &color)
Set the outline color of the text.
void setAlignment(Alignment align)
Set the alignement of the text.
Alignment getAlignment() const
Get the alignment of the text.
Definition: Text.h:300
Graphical text that can be drawn to a render target.
Definition: Text.h:89
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
Rect< float > RectF
A float rectangle.
Definition: Rect.h:306
const std::string & getString() const
Get the text's string.
Definition: Text.h:139
void setParagraphWidth(float paragraphWidth)
Set the paragraph width for aligned text.
void setString(std::string string)
Set the text's string.
Text(std::string string, Font &font, unsigned characterSize=30)
Construct the text from a string, font and size.
A character font.
Definition: Font.h:130
float getParagraphWidth() const
Get the paragraph width.
Definition: Text.h:280
const Color4f & getOutlineColor() const
Get the outline color of the text.
Definition: Text.h:238
Vector< float, 4 > Color4f
A float color vector with 4 components.
Definition: Vector.h:855
Anchor
The origin anchor of the transformable object.
Definition: Transformable.h:45
const Font * getFont() const
Get the text's font.
Definition: Text.h:192
#define GF_API
Definition: Portability.h:35
VertexBuffer commitOutlineGeometry() const
Create a buffer with the current outline geometry.
void setCharacterSize(unsigned characterSize)
Set the character size.
Alignment
The alignement of the text.
Definition: Text.h:94