- Main Page
- Classes
- Files

- File List

# C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/bitmap.h

    00001 #ifndef _BITMAP_H_
    00002 #define _BITMAP_H_
    00003
    00004 #include <nds.h>
    00005 #include "woopsiarray.h"
    00006
    00007 namespace WoopsiUI {
    00008
    00009         class FontBase;
    00010
    00014         class Bitmap {
    00015         public:
    00016
    00022                 Bitmap(u16 width, u16 height);
    00023
    00027                 virtual inline ~Bitmap() {
    00028                         delete[] _bitmap;
    00029                 };
    00030
    00037                 const u16 getPixel(s16 x, s16 y) const;
    00038
    00043                 inline const u16* getBitmap() const { return _bitmap; };
    00044
    00049                 inline const u16 getWidth() const { return _width; };
    00050
    00055                 inline const u16 getHeight() const { return _height; };
    00056
    00063                 virtual void drawPixel(s16 x, s16 y, u16 colour);
    00064
    00073                 virtual void drawFilledRect(s16 x, s16 y, u16 width, u16 height, u16 colour);
    00074
    00082                 virtual void drawHorizLine(s16 x, s16 y, u16 width, u16 colour);
    00083
    00091                 virtual void drawVertLine(s16 x, s16 y, u16 height, u16 colour);
    00092
    00101                 virtual void drawRect(s16 x, s16 y, u16 width, u16 height, u16 colour);
    00102
    00111                 virtual void drawLine(s16 x1, s16 y1, s16 x2, s16 y2, u16 colour);
    00112
    00120                 virtual void drawCircle(s16 x0, s16 y0, u16 radius, u16 colour);
    00121
    00129                 virtual void drawFilledCircle(s16 x0, s16 y0, u16 radius, u16 colour);
    00130
    00138                 virtual void drawText(s16 x, s16 y, FontBase* font, const char* string);
    00139
    00148                 virtual void drawText(s16 x, s16 y, FontBase* font, const char* string, u16 colour);
    00149
    00162                 virtual void drawBitmap(s16 x, s16 y, u16 width, u16 height, const u16* bitmap, s16 bitmapX, s16  bitmapY, u16 bitmapWidth, u16 bitmapHeight);
    00163
    00170                 virtual void floodFill(s16 x, s16 y, u16 newColour);
    00171
    00180                 virtual void drawEllipse(s16 xCentre, s16 yCentre, s16 horizRadius, s16 vertRadius, u16 colour);
    00181
    00190                 virtual void drawFilledEllipse(s16 xCentre, s16 yCentre, s16 horizRadius, s16 vertRadius, u16 colour);
    00191
    00192         protected:
    00193                 u16 _width;
    00194                 u16 _height;
    00195                 u16* _bitmap __attribute__ ((aligned (4)));
    00204                 bool popStack(s16* x, s16* y, WoopsiArray<s32>* stack);
    00205
    00212                 void pushStack(s16 x, s16 y, WoopsiArray<s32>* stack) ;
    00213
    00221                 bool clipBitmapCoordinates(s16* x, s16* y, u16* width, u16* height);
    00222
    00226                 inline Bitmap(const Bitmap& bitmap) { };
    00227         };
    00228 }
    00229
    00230 #endif

All Classes Functions Variables Enumerations Enumerator