# 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 (MutableBitmapBase *bitmap, 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 (MutableBitmapBase *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 | ( | MutableBitmapBase * | 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 supplied bitmap.
  | bitmapHeight | The height of the supplied bitmap.
  | 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.

static void WoopsiUI::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.

static void WoopsiUI::TextWriter::drawString | ( | MutableBitmapBase * | bitmap,
|  | 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.
  | 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.

static void WoopsiUI::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 file:

- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/textwriter.h