aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Bitmap.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-14 22:52:40 +0800
committerchai <chaifix@163.com>2018-10-14 22:52:40 +0800
commitb1bbc998960fff2169dc5a992c47d08723472f9b (patch)
tree220f3bd5de2266e248884e11161dd715d7632ef2 /src/libjin/Graphics/Bitmap.h
parentfbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff)
*直接渲染字符串
Diffstat (limited to 'src/libjin/Graphics/Bitmap.h')
-rw-r--r--src/libjin/Graphics/Bitmap.h6
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);