This class stores settings when rendering fonts, used when instantiating irr::gui::ScalableFont.
More...
#include <font_settings.hpp>
|
| FontSettings (bool black_border=false, bool colored_border=false, bool thin_border=false, float scale=1.0f, bool shadow=false, const video::SColor &shadow_color=video::SColor(0, 0, 0, 0), const video::SColor &border_color=video::SColor(0, 0, 0, 0)) |
| Constructor. More...
|
|
void | setScale (float scale) |
| Set the scaling. More...
|
|
float | getScale () const |
| Return the scaling. More...
|
|
void | setShadowColor (const video::SColor &col) |
| Set the color of shadow. More...
|
|
const video::SColor & | getShadowColor () const |
| Return the color of shadow. More...
|
|
bool | useShadow () const |
| Return if shadow is enabled. More...
|
|
void | setShadow (bool shadow) |
| Set whether shadow is enabled. More...
|
|
void | setBlackBorder (bool border) |
| Set whether black border is enabled. More...
|
|
void | setColoredBorder (bool border) |
| Set whether a custom colored border is enabled. More...
|
|
void | setThinBorder (bool thin) |
| Set whether the text outline should be thin or not. More...
|
|
void | setBorderColor (const video::SColor &col) |
| Set the color of border (used when a non-black border is requested). More...
|
|
const video::SColor & | getBorderColor () const |
| Return the color of the border. More...
|
|
bool | useBlackBorder () const |
| Return if black border is enabled. More...
|
|
bool | useColoredBorder () const |
| Return if black border is enabled. More...
|
|
bool | useThinBorder () const |
| Return if the border should be thin or not. More...
|
|
This class stores settings when rendering fonts, used when instantiating irr::gui::ScalableFont.
◆ FontSettings()
FontSettings::FontSettings |
( |
bool |
black_border = false , |
|
|
bool |
colored_border = false , |
|
|
bool |
thin_border = false , |
|
|
float |
scale = 1.0f , |
|
|
bool |
shadow = false , |
|
|
const video::SColor & |
shadow_color = video::SColor(0, 0, 0, 0) , |
|
|
const video::SColor & |
border_color = video::SColor(0, 0, 0, 0) |
|
) |
| |
|
inline |
Constructor.
It will initialize all members with default values if no parameter is given.
◆ getBorderColor()
const video::SColor& FontSettings::getBorderColor |
( |
| ) |
const |
|
inline |
Return the color of the border.
◆ getScale()
float FontSettings::getScale |
( |
| ) |
const |
|
inline |
◆ getShadowColor()
const video::SColor& FontSettings::getShadowColor |
( |
| ) |
const |
|
inline |
Return the color of shadow.
◆ setBlackBorder()
void FontSettings::setBlackBorder |
( |
bool |
border | ) |
|
|
inline |
Set whether black border is enabled.
- Parameters
-
◆ setBorderColor()
void FontSettings::setBorderColor |
( |
const video::SColor & |
col | ) |
|
|
inline |
Set the color of border (used when a non-black border is requested).
- Parameters
-
col | The color of border to be set. |
◆ setColoredBorder()
void FontSettings::setColoredBorder |
( |
bool |
border | ) |
|
|
inline |
Set whether a custom colored border is enabled.
- Parameters
-
◆ setScale()
void FontSettings::setScale |
( |
float |
scale | ) |
|
|
inline |
Set the scaling.
- Parameters
-
◆ setShadow()
void FontSettings::setShadow |
( |
bool |
shadow | ) |
|
|
inline |
Set whether shadow is enabled.
- Parameters
-
◆ setShadowColor()
void FontSettings::setShadowColor |
( |
const video::SColor & |
col | ) |
|
|
inline |
Set the color of shadow.
- Parameters
-
col | The color of shadow to be set. |
◆ setThinBorder()
void FontSettings::setThinBorder |
( |
bool |
thin | ) |
|
|
inline |
Set whether the text outline should be thin or not.
◆ useBlackBorder()
bool FontSettings::useBlackBorder |
( |
| ) |
const |
|
inline |
Return if black border is enabled.
◆ useColoredBorder()
bool FontSettings::useColoredBorder |
( |
| ) |
const |
|
inline |
Return if black border is enabled.
◆ useShadow()
bool FontSettings::useShadow |
( |
| ) |
const |
|
inline |
Return if shadow is enabled.
◆ useThinBorder()
bool FontSettings::useThinBorder |
( |
| ) |
const |
|
inline |
Return if the border should be thin or not.
◆ m_black_border
bool FontSettings::m_black_border |
|
private |
True if black border will be drawn when rendering.
◆ m_colored_border
bool FontSettings::m_colored_border |
|
private |
True if a custom colored border will be drawn when rendering.
If both a black border and a colored border are set to be used, the colored border will take priority.
◆ m_scale
float FontSettings::m_scale |
|
private |
◆ m_shadow
bool FontSettings::m_shadow |
|
private |
True if shadow will be drawn when rendering.
◆ m_shadow_color
video::SColor FontSettings::m_shadow_color |
|
private |
Save the color of shadow when rendering.
The documentation for this class was generated from the following file: