|
Woopsi 1.3
Nintendo DS Gui Framework
|
#include <libwoopsi/include/fontbase.h>
Public Member Functions | |
| virtual | ~FontBase () |
| virtual const bool | isCharBlank (const u32 letter) const =0 |
| virtual s16 | drawChar (MutableBitmapBase *bitmap, u32 letter, u16 colour, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)=0 |
| virtual s16 | drawBaselineChar (MutableBitmapBase *bitmap, u32 letter, u16 colour, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)=0 |
| virtual u16 | getStringWidth (const WoopsiString &text) const =0 |
| virtual u16 | getStringWidth (const WoopsiString &text, s32 startIndex, s32 length) const =0 |
| virtual u8 | getCharWidth (u32 letter) const =0 |
| virtual u8 | getCharHeight (u32 letter) const =0 |
| virtual s8 | getCharTop (u32 letter) const =0 |
| virtual const u8 | getHeight () const =0 |
Abstract class defining the basic properties of a font and providing some of the essential functionality. Should be used as a base class for all fonts.
| virtual WoopsiUI::FontBase::~FontBase | ( | ) | [inline, virtual] |
Destructor.
| virtual s16 WoopsiUI::FontBase::drawBaselineChar | ( | MutableBitmapBase * | bitmap, |
| u32 | letter, | ||
| u16 | colour, | ||
| s16 | x, | ||
| s16 | y, | ||
| u16 | clipX1, | ||
| u16 | clipY1, | ||
| u16 | clipX2, | ||
| u16 | clipY2 | ||
| ) | [pure virtual] |
Draw an individual character of the font to the specified bitmap on a baseline.
| bitmap | The bitmap to draw to. |
| letter | The character to output. |
| colour | The colour to draw with. |
| x | The x co-ordinate of the pen. |
| y | The y co-ordinate of the pen. |
| clipX1 | The left edge of the clipping rectangle. |
| clipY1 | The top edge of the clipping rectangle. |
| clipX2 | The right edge of the clipping rectangle. |
| clipY2 | The bottom edge of the clipping rectangle. |
Implemented in WoopsiUI::PackedFontBase.
| virtual s16 WoopsiUI::FontBase::drawChar | ( | MutableBitmapBase * | bitmap, |
| u32 | letter, | ||
| u16 | colour, | ||
| s16 | x, | ||
| s16 | y, | ||
| u16 | clipX1, | ||
| u16 | clipY1, | ||
| u16 | clipX2, | ||
| u16 | clipY2 | ||
| ) | [pure virtual] |
Draw an individual character of the font to the specified bitmap.
| bitmap | The bitmap to draw to. |
| letter | The character to output. |
| colour | The colour to draw with. |
| x | The x co-ordinate of the text. |
| y | The y co-ordinate of the text. |
| clipX1 | The left edge of the clipping rectangle. |
| clipY1 | The top edge of the clipping rectangle. |
| clipX2 | The right edge of the clipping rectangle. |
| clipY2 | The bottom edge of the clipping rectangle. |
Implemented in WoopsiUI::PackedFontBase.
| virtual u8 WoopsiUI::FontBase::getCharHeight | ( | u32 | letter | ) | const [pure virtual] |
Get the height of an individual character.
| letter | The letter to get the height of. |
Implemented in WoopsiUI::PackedFontBase.
| virtual s8 WoopsiUI::FontBase::getCharTop | ( | u32 | letter | ) | const [pure virtual] |
Get the algebric distance from baseline to top of an individual character.
| letter | The character to get the "top" of. |
Implemented in WoopsiUI::PackedFontBase.
| virtual u8 WoopsiUI::FontBase::getCharWidth | ( | u32 | letter | ) | const [pure virtual] |
Get the width of an individual character.
| letter | The character to get the width of. |
Implemented in WoopsiUI::PackedFontBase.
| virtual const u8 WoopsiUI::FontBase::getHeight | ( | ) | const [pure virtual] |
Gets the height of the font.
Implemented in WoopsiUI::PackedFontBase.
| virtual u16 WoopsiUI::FontBase::getStringWidth | ( | const WoopsiString & | text | ) | const [pure virtual] |
Get the width of a string in pixels when drawn with this font.
| text | The string to check. |
Implemented in WoopsiUI::PackedFontBase.
| virtual u16 WoopsiUI::FontBase::getStringWidth | ( | const WoopsiString & | text, |
| s32 | startIndex, | ||
| s32 | length | ||
| ) | const [pure virtual] |
Get the width of a portion of a string in pixels when drawn with this font.
| text | The string to check. |
| startIndex | The start point of the substring within the string. |
| length | The length of the substring in chars. |
Implemented in WoopsiUI::PackedFontBase.
| virtual const bool WoopsiUI::FontBase::isCharBlank | ( | const u32 | letter | ) | const [pure virtual] |
Checks if supplied character is blank in the current font.
| letter | The character to check. |
Implemented in WoopsiUI::PackedFontBase.
1.7.4