- RGBAPixel* pixels;
- unsigned int width, height;
-
- RGBAImage(unsigned int _width, unsigned int _height)
- : pixels(new RGBAPixel[_width * _height]), width(_width), height(_height)
- {
- }
- ~RGBAImage()
- {
- delete pixels;
- }
-
- void release()
- {
- delete this;
- }
- byte* getRGBAPixels() const
- {
- return reinterpret_cast<byte*>(pixels);
- }
- unsigned int getWidth() const
- {
- return width;
- }
- unsigned int getHeight() const
- {
- return height;
- }
+RGBAPixel* pixels;
+unsigned int width, height;
+
+RGBAImage( unsigned int _width, unsigned int _height )
+ : pixels( new RGBAPixel[_width * _height] ), width( _width ), height( _height ){
+}
+~RGBAImage(){
+ delete[] pixels;
+}
+
+void release(){
+ delete this;
+}
+byte* getRGBAPixels() const {
+ return reinterpret_cast<byte*>( pixels );
+}
+unsigned int getWidth() const {
+ return width;
+}
+unsigned int getHeight() const {
+ return height;
+}