WoopsiGfx 1.4
Nintendo DS 2D Graphics Library
|
#include <libwoopsigfx/include/packedfont1.h>
Public Member Functions | |
PackedFont1 (u8 first, u8 last, const u16 *glyphData, const u16 *glyphOffset, const u8 *glyphWidth, const u8 height, const u8 spWidth, const u8 charTop, const u8 fixedWidth=0) | |
void | renderChar (const u16 *pixelData, u16 pixelsPerRow, MutableBitmapBase *bitmap, u16 colour, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2) |
PackedFont1 is a class for managing 1-bit packed fonts.
WoopsiGfx::PackedFont1::PackedFont1 | ( | u8 | first, |
u8 | last, | ||
const u16 * | glyphData, | ||
const u16 * | glyphOffset, | ||
const u8 * | glyphWidth, | ||
const u8 | height, | ||
const u8 | spWidth, | ||
const u8 | charTop, | ||
const u8 | fixedWidth = 0 |
||
) | [inline] |
Constructor.
first | Ascii index of first character in glphyDdata. |
last | Ascii index of last character in glyphData. |
glyphData | Packed array representing font. |
glyphOffset | Offset into glyphData[] of character[i]. |
glyphWidth | Pixel width of character[i]. |
spWidth | The height of a space |
height | The height of the font. |
charTop | The height of the font minus the blank spaces below 'a'. |
fixedWidth | Character width (fixed), or 0 for proportional. |
void PackedFont1::renderChar | ( | const u16 * | pixelData, |
u16 | pixelsPerRow, | ||
MutableBitmapBase * | bitmap, | ||
u16 | colour, | ||
s16 | x, | ||
s16 | y, | ||
u16 | clipX1, | ||
u16 | clipY1, | ||
u16 | clipX2, | ||
u16 | clipY2 | ||
) | [virtual] |
Render an individual character of the font to the specified bitmap.
pixelData | The font-specific pixel data. |
pixelsPerRow | The number of pixels to render per row (for this character). |
bitmap | Bitmap to draw to. |
colour | The colour to draw with. If this is 0 the font's default colour will be used. |
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 WoopsiGfx::PackedFontBase.