31#include "GraphicsApi.h"
32#include "Transformable.h"
34#include "VertexArray.h"
35#include "VertexBuffer.h"
38#ifndef DOXYGEN_SHOULD_SKIP_THIS
96 Text(std::string
string,
Font& font,
unsigned characterSize = 30);
120 return m_basic.getString();
142 return m_basic.getCharacterSize();
173 return m_basic.getFont();
219 return m_outlineColor;
241 return m_basic.getOutlineThickness();
266 return m_basic.getLineSpacing();
295 return m_basic.getLetterSpacing();
315 return m_basic.getParagraphWidth();
335 return m_basic.getAlignment();
350 return m_basic.getLocalBounds();
388 void updateGeometry();
400#ifndef DOXYGEN_SHOULD_SKIP_THIS
A basic text.
Definition: BasicText.h:50
A character font.
Definition: Font.h:109
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Graphical text that can be drawn to a render target.
Definition: Text.h:80
const Font * getFont() const
Get the text's font.
Definition: Text.h:172
float getLetterSpacing() const
Get the size of the letter spacing factor.
Definition: Text.h:294
void setOutlineColor(const Color4f &color)
Set the outline color of the text.
VertexBuffer commitOutlineGeometry() const
Create a buffer with the current outline geometry.
void setString(std::string string)
Set the text's string.
float getParagraphWidth() const
Get the paragraph width.
Definition: Text.h:314
RectF getLocalBounds() const
Get the local bounding rectangle of the entity.
Definition: Text.h:349
void setColor(const Color4f &color)
Set the fill color of the text.
void setLineSpacing(float spacingFactor)
Set the line spacing factor.
const Color4f & getColor() const
Get the fill color of the text.
Definition: Text.h:196
unsigned getCharacterSize() const
Get the character size.
Definition: Text.h:141
void setOutlineThickness(float thickness)
Set the thickness of the text's outline.
void setCharacterSize(unsigned characterSize)
Set the character size.
Text()
Default constructor.
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
void setFont(Font &font)
Set the text's font.
float getOutlineThickness()
Get the outline thickness of the text.
Definition: Text.h:240
void setAlignment(Alignment align)
Set the alignement of the text.
void setLetterSpacing(float spacingFactor)
Set the letter spacing factor.
virtual void draw(RenderTarget &target, const RenderStates &states) override
Draw the object to a render target.
void setParagraphWidth(float paragraphWidth)
Set the paragraph width for aligned text.
void setAnchor(Anchor anchor)
Set the anchor origin of the entity.
float getLineSpacing() const
Get the size of the line spacing factor.
Definition: Text.h:265
const std::string & getString() const
Get the text's string.
Definition: Text.h:119
const Color4f & getOutlineColor() const
Get the outline color of the text.
Definition: Text.h:218
Text(std::string string, Font &font, unsigned characterSize=30)
Construct the text from a string, font and size.
Alignment getAlignment() const
Get the alignment of the text.
Definition: Text.h:334
A set of primitives.
Definition: VertexArray.h:65
Data in the graphics memory.
Definition: VertexBuffer.h:81
Anchor
An anchor of a box.
Definition: Anchor.h:38
Alignment
The alignement of a text.
Definition: Alignment.h:33
The namespace for gf classes.
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A 4D vector.
Definition: Vector.h:852