|
Woopsi 1.3
Nintendo DS Gui Framework
|
00001 #ifndef _BITMAP_H_ 00002 #define _BITMAP_H_ 00003 00004 #include <nds.h> 00005 #include "bitmapbase.h" 00006 #include "mutablebitmapbase.h" 00007 #include "woopsiarray.h" 00008 00009 namespace WoopsiUI { 00010 00011 class Graphics; 00012 00017 class Bitmap : public MutableBitmapBase { 00018 public: 00019 00025 Bitmap(u16 width, u16 height); 00026 00031 Bitmap(const BitmapBase& bitmap); 00032 00036 virtual inline ~Bitmap() { 00037 delete[] _bitmap; 00038 }; 00039 00046 const u16 getPixel(s16 x, s16 y) const; 00047 00054 void setPixel(const s16 x, const s16 y, const u16 colour); 00055 00060 inline const u16* getData() const { return _bitmap; }; 00061 00069 const u16* getData(s16 x, s16 y) const; 00070 00076 Graphics* newGraphics(); 00077 00085 void blit(const s16 x, const s16 y, const u16* data, const u32 size); 00086 00094 void blitFill(const s16 x, const s16 y, const u16 colour, const u32 size); 00095 00108 void copy(s16 x, s16 y, u32 size, u16* dest) const; 00109 00114 inline const u16 getWidth() const { return _width; }; 00115 00120 inline const u16 getHeight() const { return _height; }; 00121 00130 void setDimensions(u16 width, u16 height); 00131 00132 protected: 00133 u16* _bitmap __attribute__ ((aligned (4))); 00134 u16 _width; 00135 u16 _height; 00136 }; 00137 } 00138 00139 #endif
1.7.4