1
0
Fork 0

Graphics/Text.h: Adding outline width/color.

This commit is contained in:
Henrik Hautakoski 2016-03-29 07:31:52 +02:00
parent 1423a161a4
commit 308e0dff6b
2 changed files with 36 additions and 1 deletions

View file

@ -4,13 +4,18 @@
Text::Text() :
m_font (NULL),
m_color (255, 255, 255, 255)
m_color (255, 255, 255, 255),
m_outlineColor (0, 0, 0, 255),
m_outlineWidth (0)
{
}
Text::Text(const std::string text, const Font& font) :
m_font (&font),
m_string (text),
m_color (255, 255, 255, 255),
m_outlineColor (0, 0, 0, 255),
m_outlineWidth (0),
m_geometryNeedsUpdate (true)
{
}
@ -47,6 +52,26 @@ const Color& Text::getColor() const
return m_color;
}
void Text::setOutlineColor(const Color& color)
{
m_outlineColor = color;
}
const Color& Text::getOutlineColor() const
{
return m_outlineColor;
}
void Text::setOutlineSize(unsigned int size)
{
m_outlineWidth = size;
}
unsigned int Text::getOutlineSize() const
{
return m_outlineWidth;
}
Vector2f Text::getSize() const
{
Vector2f size;