#include <font.h>
Public Member Functions | |
Font (const BitmapBase *bitmap, const u8 width, const u8 height, const u16 transparentColour) | |
~Font () | |
const u16 | getPixel (const s16 x, const s16 y) const |
s16 | drawChar (MutableBitmapBase *bitmap, char letter, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2) |
Fixed-width multicolour bitmap font that uses a 16-bit bitmap as its glyph data.
WoopsiUI::Font::Font | ( | const BitmapBase * | bitmap, | |
const u8 | width, | |||
const u8 | height, | |||
const u16 | transparentColour | |||
) |
Constructor.
bitmap | Bitmap containing the font's glyph data. | |
width | The width of a single glyph. | |
height | The height of a single glyph. | |
transparentColour | The colour of the font's background. |
WoopsiUI::Font::~Font | ( | ) | [inline] |
Destructor.
s16 WoopsiUI::Font::drawChar | ( | MutableBitmapBase * | bitmap, | |
char | letter, | |||
s16 | x, | |||
s16 | y, | |||
u16 | clipX1, | |||
u16 | clipY1, | |||
u16 | clipX2, | |||
u16 | clipY2 | |||
) | [virtual] |
Draw an individual character of the font to the specified bitmap.
bitmap | The bitmap to draw to. | |
letter | The character to output. | |
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. |
Implements WoopsiUI::FontBase.
const u16 WoopsiUI::Font::getPixel | ( | const s16 | x, | |
const s16 | y | |||
) | const [virtual] |
Get the colour of the pixel at the specified offset from the start of the bitmap.
x | The x co-ordinate of the pixel. | |
y | The y co-ordinate of the pixel. |
Implements WoopsiUI::FixedWidthFontBase.