37 #ifndef DOXYGEN_SHOULD_SKIP_THIS 
  106     Text(std::string string, 
Font& font, 
unsigned characterSize = 30);
 
  152       return m_characterSize;
 
  197     void setColor(
const Color4f& color);
 
  229       return m_outlineColor;
 
  251       return m_outlineThickness;
 
  271       return m_paragraphWidth;
 
  344     void updateGeometry();
 
  348       std::vector<std::u32string> words;
 
  350       float spacing = 0.0f;
 
  354       std::vector<Line> lines;
 
  357     float getWordWidth(
const std::u32string& word);
 
  359     std::vector<Paragraph> makeParagraphs(
const std::string& str, 
float spaceWidth);
 
  362     std::string m_string;
 
  364     unsigned m_characterSize;
 
  369     Color4f m_outlineColor;
 
  370     float m_outlineThickness;
 
  373     float m_paragraphWidth;
 
  377 #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:250
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:82
const Color4f & getColor() const 
Get the fill color of the text. 
Definition: Text.h:206
unsigned getCharacterSize() const 
Get the character size. 
Definition: Text.h:151
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:305
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:290
Graphical text that can be drawn to a render target. 
Definition: Text.h:90
VertexBuffer commitGeometry() const 
Create a buffer with the current geometry. 
const std::string & getString() const 
Get the text's string. 
Definition: Text.h:129
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
Alignment
The alignement of a text. 
Definition: Alignment.h:32
float getParagraphWidth() const 
Get the paragraph width. 
Definition: Text.h:270
const Color4f & getOutlineColor() const 
Get the outline color of the text. 
Definition: Text.h:228
Anchor
The origin anchor of the transformable object. 
Definition: Transformable.h:45
const Font * getFont() const 
Get the text's font. 
Definition: Text.h:182
#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.