#include <graphicsunclipped.h>
Public Member Functions | |
GraphicsUnclipped (MutableBitmapBase *bitmap) | |
virtual | ~GraphicsUnclipped () |
virtual const u16 | getPixel (s16 x, s16 y) const |
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, u16 length, const char *string) |
virtual void | drawText (s16 x, s16 y, FontBase *font, const char *string, u16 colour) |
virtual void | drawText (s16 x, s16 y, FontBase *font, u16 length, const char *string, u16 colour) |
virtual void | drawText (s16 x, s16 y, FontBase *font, char letter) |
virtual void | drawText (s16 x, s16 y, FontBase *font, char letter, u16 colour) |
virtual void | drawBitmap (s16 x, s16 y, u16 width, u16 height, const BitmapBase *bitmap, s16 bitmapX, s16 bitmapY) |
virtual void | drawBitmap (s16 x, s16 y, u16 width, u16 height, const BitmapBase *bitmap, s16 bitmapX, s16 bitmapY, u16 transparentColour) |
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 | drawXORPixel (s16 x, s16 y) |
virtual void | drawXORHorizLine (s16 x, s16 y, u16 width) |
virtual void | drawXORVertLine (s16 x, s16 y, u16 height) |
virtual void | drawXORRect (s16 x, s16 y, u16 width, u16 height) |
virtual void | drawFilledXORRect (s16 x, s16 y, u16 width, u16 height) |
void | copy (s16 sourceX, s16 sourceY, s16 destX, s16 destY, u16 width, u16 height) |
void | dim (s16 x, s16 y, u16 width, u16 height) |
Protected Member Functions | |
GraphicsUnclipped (const GraphicsUnclipped &graphicsUnclipped) | |
Protected Attributes | |
MutableBitmapBase * | _bitmap |
u16 * | _data |
u16 | _width |
Class providing bitmap manipulation (drawing, etc) functions. Functions do not clip to the dimensions of the bitmap.
WoopsiUI::GraphicsUnclipped::GraphicsUnclipped | ( | MutableBitmapBase * | bitmap | ) |
Constructor.
bitmap | The bitmap that will be drawn to. |
virtual WoopsiUI::GraphicsUnclipped::~GraphicsUnclipped | ( | ) | [inline, virtual] |
Destructor.
WoopsiUI::GraphicsUnclipped::GraphicsUnclipped | ( | const GraphicsUnclipped & | graphicsUnclipped | ) | [inline, protected] |
Copy constructor is protected to prevent usage.
void WoopsiUI::GraphicsUnclipped::copy | ( | s16 | sourceX, | |
s16 | sourceY, | |||
s16 | destX, | |||
s16 | destY, | |||
u16 | width, | |||
u16 | height | |||
) |
Copy a rectangular region from the source co-ordinates to the destination co-ordinates. Uses the DMA for speed. Worst-case scenario uses an off-screen buffer for situations wherein there is no vertical movement and the source and destination overlap, in which case two copies are performed for each row (source to buffer and buffer to destination). Does not clip.
sourceX | Source x co-ord. | |
sourceY | Source y co-ord. | |
destX | Destination x co-ord. | |
destY | Destination y co-ord. | |
width | Width of the rectangle to copy. | |
height | Height of the rectangle to copy. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
void WoopsiUI::GraphicsUnclipped::dim | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height | |||
) |
Halve the brightness of a specified region.
x | X co-ord of the region to dim. | |
y | Y co-ord of the region to dim. | |
width | Width of the region to dim. | |
height | Height of the region to dim. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawBitmap | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height, | |||
const BitmapBase * | bitmap, | |||
s16 | bitmapX, | |||
s16 | bitmapY, | |||
u16 | transparentColour | |||
) | [virtual] |
Draw a bitmap to the port's bitmap, using the supplied transparent colour as an invisible colour. This is considerably slower than the standard bitmap drawing routine as it plots pixel-by-pixel instead of using a scanline DMA copy.
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. | |
transparentColour | The transparent colour used in the bitmap. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawBitmap | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height, | |||
const BitmapBase * | 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. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawFilledXORRect | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height | |||
) | [virtual] |
Invert the colour of an filled rectangle of pixels.
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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::Graphics.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawText | ( | s16 | x, | |
s16 | y, | |||
FontBase * | font, | |||
char | letter, | |||
u16 | colour | |||
) | [virtual] |
Draw a single character to the bitmap in a specific colour.
x | The x co-ordinate of the character. | |
y | The y co-ordinate of the character. | |
font | The font to draw with. | |
letter | The character to output. | |
colour | The colour of the character. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawText | ( | s16 | x, | |
s16 | y, | |||
FontBase * | font, | |||
char | letter | |||
) | [virtual] |
Draw a single character to the bitmap.
x | The x co-ordinate of the character. | |
y | The y co-ordinate of the character. | |
font | The font to draw with. | |
letter | The character to output. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawText | ( | s16 | x, | |
s16 | y, | |||
FontBase * | font, | |||
u16 | length, | |||
const char * | string, | |||
u16 | colour | |||
) | [virtual] |
Draw a particular length of a string to the bitmap in a secific colour.
x | The x co-ordinate of the string. | |
y | The y co-ordinate of the string. | |
font | The font to draw with. | |
length | The number of characters to output. | |
string | The string to output. | |
colour | The colour of the string. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawText | ( | s16 | x, | |
s16 | y, | |||
FontBase * | font, | |||
u16 | length, | |||
const char * | string | |||
) | [virtual] |
Draw a particular length of a string to the bitmap.
x | The x co-ordinate of the string. | |
y | The y co-ordinate of the string. | |
font | The font to draw with. | |
length | The number of characters to output. | |
string | The string to output. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::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. |
Reimplemented in WoopsiUI::Graphics.
virtual void WoopsiUI::GraphicsUnclipped::drawXORHorizLine | ( | s16 | x, | |
s16 | y, | |||
u16 | width | |||
) | [virtual] |
Invert the colour of a horizontal line of pixels.
x | The x co-ordinate of the line. | |
y | The y co-ordinate of the line. | |
width | The width of the line. |
Reimplemented in WoopsiUI::Graphics.
virtual void WoopsiUI::GraphicsUnclipped::drawXORPixel | ( | s16 | x, | |
s16 | y | |||
) | [virtual] |
Invert 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. |
Reimplemented in WoopsiUI::Graphics, and WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawXORRect | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height | |||
) | [virtual] |
Invert the colour of an unfilled rectangle of pixels.
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. |
Reimplemented in WoopsiUI::GraphicsPort.
virtual void WoopsiUI::GraphicsUnclipped::drawXORVertLine | ( | s16 | x, | |
s16 | y, | |||
u16 | height | |||
) | [virtual] |
Invert the colour of a vertical line of pixels.
x | The x co-ordinate of the line. | |
y | The y co-ordinate of the line. | |
height | The height of the line. |
Reimplemented in WoopsiUI::Graphics.
virtual const u16 WoopsiUI::GraphicsUnclipped::getPixel | ( | s16 | x, | |
s16 | y | |||
) | const [virtual] |
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. |
Reimplemented in WoopsiUI::Graphics.
MutableBitmapBase* WoopsiUI::GraphicsUnclipped::_bitmap [protected] |
u16* WoopsiUI::GraphicsUnclipped::_data [protected] |
Bitmap data
u16 WoopsiUI::GraphicsUnclipped::_width [protected] |