The font rendering class, see IFont.
More...
#include <murl_util_font.h>
The font rendering class, see IFont.
|
| Font (const Resource::IFont *resourceFont, Real size) |
| Constructor taking a font resource and size. More...
|
|
virtual | ~Font () |
| The destructor.
|
|
virtual Bool | SetSize (Real size) |
| Implementation of IFont::SetSize(). More...
|
|
virtual Real | GetSize () const |
| Implementation of IFont::GetSize(). More...
|
|
virtual Bool | SetSpacing (Real spacing) |
| Implementation of IFont::SetSpacing(). More...
|
|
virtual Real | GetSpacing () const |
| Implementation of IFont::GetSpacing(). More...
|
|
virtual Bool | SetLeading (Real leading) |
| Implementation of IFont::SetLeading(). More...
|
|
virtual Real | GetLeading () const |
| Implementation of IFont::GetLeading(). More...
|
|
virtual Bool | SetEmbolding (Real strength) |
| Implementation of IFont::SetEmbolding(). More...
|
|
virtual Real | GetEmbolding () const |
| Implementation of IFont::GetEmbolding(). More...
|
|
virtual Bool | SetBlur (Real strength) |
| Implementation of IFont::SetBlur(). More...
|
|
virtual Real | GetBlur () const |
| Implementation of IFont::GetBlur(). More...
|
|
virtual Bool | SetSpaceWidthFactor (Real factor) |
| Implementation of IFont::SetSpaceWidthFactor(). More...
|
|
virtual Real | GetSpaceWidthFactor () const |
| Implementation of IFont::GetSpaceWidthFactor(). More...
|
|
virtual Bool | SetDigitWidthFactor (Real factor) |
| Implementation of IFont::SetDigitWidthFactor(). More...
|
|
virtual Real | GetDigitWidthFactor () const |
| Implementation of IFont::GetDigitWidthFactor(). More...
|
|
virtual Bool | SetSameDigitWidthEnabled (Bool enabled) |
| Implementation of IFont::SetSameDigitWidthEnabled(). More...
|
|
virtual Bool | IsSameDigitWidthEnabled () const |
| Implementation of IFont::IsSameDigitWidthEnabled(). More...
|
|
virtual Bool | RenderText (const String &text, const Color &textColor, const Color &backgroundColor, Bool clearSurface, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, IEnums::TextAlignmentX alignX, IEnums::TextAlignmentY alignY, IVideoSurface *surface) const |
| Implementation of IFont::RenderText(). More...
|
|
virtual Bool | QueryTextSize (const String &text, Bool enableWordWrap, Real containerPosX, Real containerPosY, Real containerSizeX, Real containerSizeY, Real &textSizeX, Real &textSizeY) const |
| Implementation of IFont::QueryTextSize(). More...
|
|
virtual void | SetResourceFont (const Resource::IFont *resourceFont) |
| Set the font resource. More...
|
|
virtual const Resource::IFont * | GetResourceFont () const |
| Get the font resource. More...
|
|
◆ Font()
Constructor taking a font resource and size.
- Parameters
-
resourceFont | The font resource. |
size | The size of the font. |
◆ SetSize()
virtual Bool Murl::Util::Font::SetSize |
( |
Real |
size | ) |
|
|
virtual |
◆ GetSize()
virtual Real Murl::Util::Font::GetSize |
( |
| ) |
const |
|
virtual |
◆ SetSpacing()
virtual Bool Murl::Util::Font::SetSpacing |
( |
Real |
spacing | ) |
|
|
virtual |
◆ GetSpacing()
virtual Real Murl::Util::Font::GetSpacing |
( |
| ) |
const |
|
virtual |
◆ SetLeading()
virtual Bool Murl::Util::Font::SetLeading |
( |
Real |
leading | ) |
|
|
virtual |
◆ GetLeading()
virtual Real Murl::Util::Font::GetLeading |
( |
| ) |
const |
|
virtual |
◆ SetEmbolding()
virtual Bool Murl::Util::Font::SetEmbolding |
( |
Real |
strength | ) |
|
|
virtual |
◆ GetEmbolding()
virtual Real Murl::Util::Font::GetEmbolding |
( |
| ) |
const |
|
virtual |
◆ SetBlur()
virtual Bool Murl::Util::Font::SetBlur |
( |
Real |
strength | ) |
|
|
virtual |
Implementation of IFont::SetBlur().
- Parameters
-
strength | The positive blur strength value. |
- Returns
- true if successful.
Implements Murl::IFont.
◆ GetBlur()
virtual Real Murl::Util::Font::GetBlur |
( |
| ) |
const |
|
virtual |
◆ SetSpaceWidthFactor()
virtual Bool Murl::Util::Font::SetSpaceWidthFactor |
( |
Real |
factor | ) |
|
|
virtual |
◆ GetSpaceWidthFactor()
virtual Real Murl::Util::Font::GetSpaceWidthFactor |
( |
| ) |
const |
|
virtual |
◆ SetDigitWidthFactor()
virtual Bool Murl::Util::Font::SetDigitWidthFactor |
( |
Real |
factor | ) |
|
|
virtual |
◆ GetDigitWidthFactor()
virtual Real Murl::Util::Font::GetDigitWidthFactor |
( |
| ) |
const |
|
virtual |
◆ SetSameDigitWidthEnabled()
virtual Bool Murl::Util::Font::SetSameDigitWidthEnabled |
( |
Bool |
enabled | ) |
|
|
virtual |
◆ IsSameDigitWidthEnabled()
virtual Bool Murl::Util::Font::IsSameDigitWidthEnabled |
( |
| ) |
const |
|
virtual |
◆ RenderText()
virtual Bool Murl::Util::Font::RenderText |
( |
const String & |
text, |
|
|
const Color & |
textColor, |
|
|
const Color & |
backgroundColor, |
|
|
Bool |
clearSurface, |
|
|
Bool |
enableWordWrap, |
|
|
Real |
containerPosX, |
|
|
Real |
containerPosY, |
|
|
Real |
containerSizeX, |
|
|
Real |
containerSizeY, |
|
|
IEnums::TextAlignmentX |
alignX, |
|
|
IEnums::TextAlignmentY |
alignY, |
|
|
IVideoSurface * |
surface |
|
) |
| const |
|
virtual |
Implementation of IFont::RenderText().
- Parameters
-
text | The text to render. |
textColor | The text color to render. |
backgroundColor | The text background color to render. |
clearSurface | If true, the output surface is cleared before rendering. |
enableWordWrap | If true, word wrapping is enabled. |
containerPosX | The horizontal text position in the video stream. |
containerPosY | The vertical text position in the video stream. |
containerSizeX | The horizontal size of the text rectangle, or 0 if the video stream's X size should be used |
containerSizeY | The vertical size of the text rectangle, or 0 if the video stream's Y size should be used |
alignX | The horizontal text alignment. |
alignY | The vertical text alignment. |
surface | The destination video surface. |
- Returns
- true if successful.
Implements Murl::IFont.
◆ QueryTextSize()
virtual Bool Murl::Util::Font::QueryTextSize |
( |
const String & |
text, |
|
|
Bool |
enableWordWrap, |
|
|
Real |
containerPosX, |
|
|
Real |
containerPosY, |
|
|
Real |
containerSizeX, |
|
|
Real |
containerSizeY, |
|
|
Real & |
textSizeX, |
|
|
Real & |
textSizeY |
|
) |
| const |
|
virtual |
Implementation of IFont::QueryTextSize().
- Parameters
-
text | The text to query. |
enableWordWrap | If true, word wrapping is enabled. |
containerPosX | The horizontal text position in the video stream. |
containerPosY | The vertical text position in the video stream. |
containerSizeX | The horizontal size of the text rectangle, or 0 if the video stream's X size should be used |
containerSizeY | The vertical size of the text rectangle, or 0 if the video stream's Y size should be used |
textSizeX | The text width return value. |
textSizeY | The text height return value. |
- Returns
- true if successful.
Implements Murl::IFont.
◆ SetResourceFont()
virtual void Murl::Util::Font::SetResourceFont |
( |
const Resource::IFont * |
resourceFont | ) |
|
|
virtual |
Set the font resource.
- Parameters
-
resourceFont | The font resource. |
◆ GetResourceFont()
Get the font resource.
- Returns
- The font resource.
The documentation for this class was generated from the following file: