diff options
Diffstat (limited to 'src/libjin/Graphics/Bitmap.h')
-rw-r--r-- | src/libjin/Graphics/Bitmap.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libjin/Graphics/Bitmap.h b/src/libjin/Graphics/Bitmap.h index 5510569..553d999 100644 --- a/src/libjin/Graphics/Bitmap.h +++ b/src/libjin/Graphics/Bitmap.h @@ -6,6 +6,7 @@ #include "../Math/Vector2.hpp" #include "../3rdparty/GLee/GLee.h" #include "Color.h" + namespace jin { namespace graphics @@ -18,7 +19,7 @@ namespace graphics static Bitmap* createBitmap(int w, int h, Color color = Color::BLACK); static Bitmap* clone(const Bitmap* bitmap); - ~Bitmap(); + virtual ~Bitmap(); /* init pixels */ void bind(Color* pixels, int w, int h); void resetPixels(const Color* pixels, int w, int h); @@ -32,8 +33,9 @@ namespace graphics /* get width and height */ inline int getWidth() const { return width; } inline int getHeight() const { return height; } + inline math::Vector2<int> getSize() const { return math::Vector2<int>(width, height); } - private: + protected: Bitmap(); Bitmap(int w, int h); |