Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- File List

# bitmap.h

    00001 #ifndef _BITMAP_H_
    00002 #define _BITMAP_H_
    00003
    00004 #include <nds.h>
    00005 #include "woopsiarray.h"
    00006 #include "mutablebitmapbase.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00010         class Graphics;
    00011
    00016         class Bitmap : public MutableBitmapBase {
    00017         public:
    00018
    00024                 Bitmap(u16 width, u16 height);
    00025
    00029                 virtual inline ~Bitmap() {
    00030                         delete[] _bitmap;
    00031                 };
    00032
    00039                 const u16 getPixel(s16 x, s16 y) const;
    00040
    00047                 void setPixel(const s16 x, const s16 y, const u16 colour);
    00048
    00053                 inline const u16* getData() const { return _bitmap; };
    00054
    00062                 const u16* getData(s16 x, s16 y) const;
    00063
    00069                 Graphics* newGraphics();
    00070
    00078                 void blit(const s16 x, const s16 y, const u16* data, const u32 size);
    00079
    00087                 void blitFill(const s16 x, const s16 y, const u16 colour, const u32 size);
    00088
    00101                 void copy(s16 x, s16 y, u32 size, u16* dest) const;
    00102
    00103         protected:
    00104                 u16* _bitmap __attribute__ ((aligned (4)));
    00109                 inline Bitmap(const Bitmap& bitmap) { };
    00110         };
    00111 }
    00112
    00113 #endif