WoopsiUI::MonoFont Class Reference

#include <monofont.h>

Inheritance diagram for WoopsiUI::MonoFont:
WoopsiUI::FixedWidthFontBase WoopsiUI::FontBase

List of all members.

Public Member Functions

 MonoFont (const u16 *bitmap, const u16 bitmapWidth, const u16 bitmapHeight, const u8 width, const u8 height, const u16 drawColour)
 ~MonoFont ()
const u16 getPixel (const u32 position) const
s16 drawChar (u16 *bitmap, u16 bitmapWidth, u16 bitmapHeight, char letter, s16 x, s16 y, u16 clipX1, u16 clipY1, u16 clipX2, u16 clipY2)

Detailed Description

Fixed-width monochrome bitmap font that uses a bitpacked bitmap of u16s as its glyph data. 1 represents a filled pixel; 0 represents an empty pixel.


Constructor & Destructor Documentation

MonoFont::MonoFont ( const u16 *  bitmap,
const u16  bitmapWidth,
const u16  bitmapHeight,
const u8  width,
const u8  height,
const u16  drawColour 
)

Constructor.

Parameters:
bitmap Bitmap containing the font's glyph data.
bitmapWidth The width of the glyph bitmap.
bitmapHeight The height of the glyph bitmap.
width The width of a single glyph.
height The height of a single glyph.
drawColour The colour to use for text output.
WoopsiUI::MonoFont::~MonoFont (  )  [inline]

Destructor.


Member Function Documentation

s16 MonoFont::drawChar ( u16 *  bitmap,
u16  bitmapWidth,
u16  bitmapHeight,
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.

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.
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.
Returns:
The x co-ordinate for the next character to be drawn.

Implements WoopsiUI::FontBase.

const u16 MonoFont::getPixel ( const u32  position  )  const [virtual]

Get the colour of the pixel at the specified offset from the start of the bitmap.

Parameters:
position The pixel's offset from the start of the bitmap.
Returns:
The pixel colour.

Implements WoopsiUI::FixedWidthFontBase.


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

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