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.
|
|
void | setScale (float scale) |
| Set the scaling.
|
|
float | getScale () const |
| Return the scaling.
|
|
void | setShadowColor (const video::SColor &col) |
| Set the color of shadow.
|
|
const video::SColor & | getShadowColor () const |
| Return the color of shadow.
|
|
bool | useShadow () const |
| Return if shadow is enabled.
|
|
void | setShadow (bool shadow) |
| Set whether shadow is enabled.
|
|
void | setBlackBorder (bool border) |
| Set whether black border is enabled.
|
|
void | setColoredBorder (bool border) |
| Set whether a custom colored border is enabled.
|
|
void | setThinBorder (bool thin) |
| Set whether the text outline should be thin or not.
|
|
void | setBorderColor (const video::SColor &col) |
| Set the color of border (used when a non-black border is requested).
|
|
const video::SColor & | getBorderColor () const |
| Return the color of the border.
|
|
bool | useBlackBorder () const |
| Return if black border is enabled.
|
|
bool | useColoredBorder () const |
| Return if black border is enabled.
|
|
bool | useThinBorder () const |
| Return if the border should be thin or not.
|
|
|
bool | m_black_border |
| True if black border will be drawn when rendering.
|
|
bool | m_colored_border |
| True if a custom colored border will be drawn when rendering.
|
|
bool | m_thin_border |
|
float | m_scale |
| Scaling when rendering.
|
|
bool | m_shadow |
| True if shadow will be drawn when rendering.
|
|
video::SColor | m_shadow_color |
| Save the color of shadow when rendering.
|
|
video::SColor | m_border_color |
| Used when m_colored_border is true.
|
|
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.
◆ 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. |
◆ 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.
The documentation for this class was generated from the following file: