WoopsiUI::TextWriter Class Reference

#include <textwriter.h>

List of all members.

Static Public Member Functions

static void drawString (FontBase *font, const char *string, u8 length, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)
static void drawString (u16 *bitmap, u16 bitmapWidth, u16 bitmapHeight, FontBase *font, const char *string, u8 length, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)
static void drawChar (FontBase *font, char letter, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)
static void drawChar (u16 *bitmap, u16 bitmapWidth, u16 bitmapHeight, FontBase *font, char letter, s16 charIndex, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)

Detailed Description

Class providing static methods for text output.


Member Function Documentation

static void WoopsiUI::TextWriter::drawChar ( u16 *  bitmap,
u16  bitmapWidth,
u16  bitmapHeight,
FontBase font,
char  letter,
s16  charIndex,
s16  x,
s16  y,
u16  clipX1,
u16  clipY1,
u16  clipX2,
u16  clipY2 
) [static]

Output a single character to one of the DS' screens. The screen number is calculated based on the specified Y co-ordinate. Text is clipped to fit within the clipping co-ordinates. This function is intended to be used to print letters that appear within a larger string, as the index of the character within that string must be supplied, and the x co-ordinate of the character is adjusted to take the character's index into account.

Parameters:
bitmap The bitmap to draw to.
bitmapWidth The width of the bitmap being drawn to.
bitmapHeight The height of the bitmap being drawn to.
font The font to use for the glyph data.
letter The character to output.
charIndex The position of this character within a larger string.
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.
void TextWriter::drawChar ( FontBase font,
char  letter,
s16  x,
s16  y,
u16  clipX1,
u16  clipY1,
u16  clipX2,
u16  clipY2 
) [static]

Output a single character to one of the DS' screens. The screen number is calculated based on the specified Y co-ordinate. Text is clipped to fit within the clipping co-ordinates.

Parameters:
font The font to use for the glyph data.
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.
void TextWriter::drawString ( u16 *  bitmap,
u16  bitmapWidth,
u16  bitmapHeight,
FontBase font,
const char *  string,
u8  length,
s16  x,
s16  y,
u16  clipX1,
u16  clipY1,
u16  clipX2,
u16  clipY2 
) [static]

Output an entire string to the specified bitmap.

Parameters:
bitmap The bitmap to draw to.
bitmapWidth The width of the bitmap being drawn to.
bitmapHeight The height of the bitmap being drawn to.
font The font to use for the glyph data.
string The string to output.
length The length of the string to output. This makes it possible to supply a length smaller than the actual length of the string if the whole string should not be printed or if it does not end in a terminator character.
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.
void TextWriter::drawString ( FontBase font,
const char *  string,
u8  length,
s16  x,
s16  y,
u16  clipX1,
u16  clipY1,
u16  clipX2,
u16  clipY2 
) [static]

Output an entire string to one of the DS' screens. The screen number is calculated based on the specified Y co-ordinate. Text is clipped to fit within the clipping co-ordinates.

Parameters:
font The font to use for the glyph data.
string The string to output.
length The length of the string to output. This makes it possible to supply a length smaller than the actual length of the string if the whole string should not be printed or if it does not end in a terminator character.
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.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator

Generated on Sat Oct 24 14:33:12 2009 for Woopsi by  doxygen 1.6.1