#include <superbitmap.h>
Public Member Functions | |
| SuperBitmap (s16 x, s16 y, u16 width, u16 height, u16 bitmapWidth, u16 bitmapHeight, bool isDecoration, FontBase *font=NULL) | |
| const u16 | getPixel (s16 x, s16 y) const |
| const u16 * | getBitmap () const |
| virtual void | draw (Rect clipRect) |
| virtual void | drawPixel (s16 x, s16 y, u16 colour) |
| virtual void | drawFilledRect (s16 x, s16 y, u16 width, u16 height, u16 colour) |
| virtual void | drawHorizLine (s16 x, s16 y, u16 width, u16 colour) |
| virtual void | drawVertLine (s16 x, s16 y, u16 height, u16 colour) |
| virtual void | drawRect (s16 x, s16 y, u16 width, u16 height, u16 colour) |
| virtual void | drawLine (s16 x1, s16 y1, s16 x2, s16 y2, u16 colour) |
| virtual void | drawCircle (s16 x0, s16 y0, u16 radius, u16 colour) |
| virtual void | drawFilledCircle (s16 x0, s16 y0, u16 radius, u16 colour) |
| virtual void | drawText (s16 x, s16 y, FontBase *font, const char *string) |
| virtual void | drawText (s16 x, s16 y, FontBase *font, const char *string, u16 colour) |
| virtual void | drawBitmap (s16 x, s16 y, u16 width, u16 height, const u16 *bitmap, s16 bitmapX, s16 bitmapY, u16 bitmapWidth, u16 bitmapHeight) |
| virtual void | drawBitmap (s16 x, s16 y, u16 width, u16 height, const Bitmap *bitmap, s16 bitmapX, s16 bitmapY) |
| virtual void | floodFill (s16 x, s16 y, u16 newColour) |
| virtual void | drawEllipse (s16 xCentre, s16 yCentre, s16 horizRadius, s16 vertRadius, u16 colour) |
| virtual void | drawFilledEllipse (s16 xCentre, s16 yCentre, s16 horizRadius, s16 vertRadius, u16 colour) |
| virtual void | clearBitmap () |
| virtual bool | drag (s16 x, s16 y, s16 vX, s16 vY) |
Protected Member Functions | |
| virtual | ~SuperBitmap () |
| SuperBitmap (const SuperBitmap &superBitmap) | |
Protected Attributes | |
| s32 | _bitmapX |
| s32 | _bitmapY |
| Bitmap * | _bitmap |
The SuperBitmap class provides a set of 2D drawing tools and a bitmap in RAM to draw on. The class manifests itself as a gadget that can be scrolled around using the stylus.
| SuperBitmap::SuperBitmap | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| u16 | bitmapWidth, | |||
| u16 | bitmapHeight, | |||
| bool | isDecoration, | |||
| FontBase * | font = NULL | |||
| ) |
Constructor.
| x | The x co-ordinate of the gadget. | |
| y | The y co-ordinate of the gadget. | |
| width | The width of the gadget. | |
| height | The height of the gadget. | |
| bitmapWidth | The desired width of the gadget's bitmap. | |
| bitmapHeight | The desired height of the gadget's bitmap. | |
| isDecoration | Specify if the gadget is a decoration or not. If set to true the gadget will function as a background image. | |
| font | The font to use for text output. |
| SuperBitmap::~SuperBitmap | ( | ) | [protected, virtual] |
Destructor.
| WoopsiUI::SuperBitmap::SuperBitmap | ( | const SuperBitmap & | superBitmap | ) | [inline, protected] |
Copy constructor is protected to prevent usage.
| void SuperBitmap::clearBitmap | ( | ) | [virtual] |
Erases the internal bitmap by filling it with the gadget's back colour.
| bool SuperBitmap::drag | ( | s16 | x, | |
| s16 | y, | |||
| s16 | vX, | |||
| s16 | vY | |||
| ) | [virtual] |
Drag the gadget.
| x | The x co-ordinate of the drag. | |
| y | The y co-ordinate of the drag. | |
| vX | The horizontal drag distance. | |
| vY | The vertical drag distance. |
Reimplemented from WoopsiUI::Gadget.
| void SuperBitmap::draw | ( | Rect | clipRect | ) | [virtual] |
Draws the region of the gadget that falls within the clipping region. Should not be called.
| clipRect | The rectangle to clip to. |
Reimplemented from WoopsiUI::Gadget.
| void SuperBitmap::drawBitmap | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| const Bitmap * | bitmap, | |||
| s16 | bitmapX, | |||
| s16 | bitmapY | |||
| ) | [virtual] |
Draw an external bitmap to the internal bitmap.
| x | The x co-ordinate to draw the bitmap to. | |
| y | The y co-ordinate to draw the bitmap to. | |
| width | The width of the bitmap to draw. | |
| height | The height of the bitmap to draw. | |
| bitmap | Pointer to the bitmap to draw. | |
| bitmapX | The x co-ordinate within the supplied bitmap to use as the origin. | |
| bitmapY | The y co-ordinate within the supplied bitmap to use as the origin. |
| void SuperBitmap::drawBitmap | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| const u16 * | bitmap, | |||
| s16 | bitmapX, | |||
| s16 | bitmapY, | |||
| u16 | bitmapWidth, | |||
| u16 | bitmapHeight | |||
| ) | [virtual] |
Draw an external bitmap to the internal bitmap.
| x | The x co-ordinate to draw the bitmap to. | |
| y | The y co-ordinate to draw the bitmap to. | |
| width | The width of the bitmap to draw. | |
| height | The height of the bitmap to draw. | |
| bitmap | Pointer to the bitmap to draw. | |
| bitmapX | The x co-ordinate within the supplied bitmap to use as the origin. | |
| bitmapY | The y co-ordinate within the supplied bitmap to use as the origin. | |
| bitmapWidth | The width of the supplied bitmap. | |
| bitmapHeight | The height of the supplied bitmap. |
| void SuperBitmap::drawCircle | ( | s16 | x0, | |
| s16 | y0, | |||
| u16 | radius, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw an unfilled circle to the internal bitmap.
| x0 | The x co-ordinate of the circle. | |
| y0 | The y co-ordinate of the circle. | |
| radius | The radius of the circle. | |
| colour | The colour of the circle. |
| void SuperBitmap::drawEllipse | ( | s16 | xCentre, | |
| s16 | yCentre, | |||
| s16 | horizRadius, | |||
| s16 | vertRadius, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw an unfilled ellipse to the bitmap.
| xCentre | The x co-ordinate of the ellipse's centre. | |
| yCentre | The y co-ordinate of the ellipse's centre. | |
| horizRadius | The size of the ellipse's horizontal radius. | |
| vertRadius | The size of the ellipse's vertical radius. | |
| colour | The colour of the ellipse. |
| void SuperBitmap::drawFilledCircle | ( | s16 | x0, | |
| s16 | y0, | |||
| u16 | radius, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a filled circle to the internal bitmap.
| x0 | The x co-ordinate of the circle. | |
| y0 | The y co-ordinate of the circle. | |
| radius | The radius of the circle. | |
| colour | The colour of the circle. |
| void SuperBitmap::drawFilledEllipse | ( | s16 | xCentre, | |
| s16 | yCentre, | |||
| s16 | horizRadius, | |||
| s16 | vertRadius, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a filled ellipse to the bitmap.
| xCentre | The x co-ordinate of the ellipse's centre. | |
| yCentre | The y co-ordinate of the ellipse's centre. | |
| horizRadius | The size of the ellipse's horizontal radius. | |
| vertRadius | The size of the ellipse's vertical radius. | |
| colour | The colour of the ellipse. |
| void SuperBitmap::drawFilledRect | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a filled rectangle to the internal bitmap.
| x | The x co-ordinate of the rectangle. | |
| y | The y co-ordinate of the rectangle. | |
| width | The width of the rectangle. | |
| height | The height of the rectangle. | |
| colour | The colour of the rectangle. |
| void SuperBitmap::drawHorizLine | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a horizontal line to the internal bitmap.
| x | The x co-ordinate of the line. | |
| y | The y co-ordinate of the line. | |
| width | The width of the line. | |
| colour | The colour of the line. |
| void SuperBitmap::drawLine | ( | s16 | x1, | |
| s16 | y1, | |||
| s16 | x2, | |||
| s16 | y2, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a line to the internal bitmap.
| x1 | The x co-ordinate of the start point of the line. | |
| y1 | The y co-ordinate of the start point of the line. | |
| x2 | The x co-ordinate of the end point of the line. | |
| y2 | The y co-ordinate of the end point of the line. | |
| colour | The colour of the line. |
| void SuperBitmap::drawPixel | ( | s16 | x, | |
| s16 | y, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a pixel to the internal bitmap.
| x | The x co-ordinate of the pixel. | |
| y | The y co-ordinate of the pixel. | |
| colour | The colour of the pixel. |
| void SuperBitmap::drawRect | ( | s16 | x, | |
| s16 | y, | |||
| u16 | width, | |||
| u16 | height, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw an unfilled rectangle to the internal bitmap.
| x | The x co-ordinate of the rectangle. | |
| y | The y co-ordinate of the rectangle. | |
| width | The width of the rectangle. | |
| height | The height of the rectangle. | |
| colour | The colour of the rectangle. |
| void SuperBitmap::drawText | ( | s16 | x, | |
| s16 | y, | |||
| FontBase * | font, | |||
| const char * | string, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a string to the internal bitmap in a specific colour.
| x | The x co-ordinate of the string. | |
| y | The y co-ordinate of the string. | |
| font | The font to draw with. | |
| string | The string to output. | |
| colour | The colour of the string. |
| void SuperBitmap::drawText | ( | s16 | x, | |
| s16 | y, | |||
| FontBase * | font, | |||
| const char * | string | |||
| ) | [virtual] |
Draw a string to the internal bitmap.
| x | The x co-ordinate of the string. | |
| y | The y co-ordinate of the string. | |
| font | The font to draw with. | |
| string | The string to output. |
| void SuperBitmap::drawVertLine | ( | s16 | x, | |
| s16 | y, | |||
| u16 | height, | |||
| u16 | colour | |||
| ) | [virtual] |
Draw a vertical line to the internal bitmap.
| x | The x co-ordinate of the line. | |
| y | The y co-ordinate of the line. | |
| height | The height of the line. | |
| colour | The colour of the line. |
| void SuperBitmap::floodFill | ( | s16 | x, | |
| s16 | y, | |||
| u16 | newColour | |||
| ) | [virtual] |
Fill a region of the internal bitmap with the specified colour.
| x | The x co-ordinate to use as the starting point of the fill. | |
| y | The y co-ordinate to use as the starting point of the fill. | |
| newColour | The colour to fill with. |
| const u16 * SuperBitmap::getBitmap | ( | ) | const |
Get a pointer to the internal bitmap.
| const u16 SuperBitmap::getPixel | ( | s16 | x, | |
| s16 | y | |||
| ) | const |
Get the colour of the pixel at the specified co-ordinates
| x | The x co-ordinate of the pixel. | |
| y | The y co-ordinate of the pixel. |
Bitmap* WoopsiUI::SuperBitmap::_bitmap [protected] |
s32 WoopsiUI::SuperBitmap::_bitmapX [protected] |
X co-ordinate of the bitmap relative to the gadget
s32 WoopsiUI::SuperBitmap::_bitmapY [protected] |
Y co-ordinate of the bitmap relative to the gadget
1.6.1