diff options
author | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
commit | b1bbc998960fff2169dc5a992c47d08723472f9b (patch) | |
tree | 220f3bd5de2266e248884e11161dd715d7632ef2 /src/libjin/Graphics/Drawable.h | |
parent | fbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff) |
*直接渲染字符串
Diffstat (limited to 'src/libjin/Graphics/Drawable.h')
-rw-r--r-- | src/libjin/Graphics/Drawable.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libjin/Graphics/Drawable.h b/src/libjin/Graphics/Drawable.h index c77068c..0c4c3ef 100644 --- a/src/libjin/Graphics/Drawable.h +++ b/src/libjin/Graphics/Drawable.h @@ -3,8 +3,10 @@ #include "../jin_configuration.h" #if LIBJIN_MODULES_RENDER +#include "../math/Quad.h" #include "../math/Vector2.hpp" #include "OpenGL.h" +#include "Bitmap.h" namespace jin { @@ -15,10 +17,12 @@ namespace graphics { public: Drawable(int w = 0, int h = 0); + Drawable(const Bitmap* bitmap); virtual ~Drawable(); void setAnchor(int x, int y); - void draw(int x, int y, float sx, float sy, float r); + void draw(int x, int y, float sx = 1, float sy = 1, float r = 0); + void draw(const math::Quad& slice, int x, int y, float sx = 1, float sy = 1, float r = 0, float ax = 0, float ay = 0); inline int getWidth() const { return size.w; } inline int getHeight() const { return size.h; } inline GLuint getTexture() const { return texture; } |