From b1bbc998960fff2169dc5a992c47d08723472f9b Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 14 Oct 2018 22:52:40 +0800 Subject: =?UTF-8?q?*=E7=9B=B4=E6=8E=A5=E6=B8=B2=E6=9F=93=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/Drawable.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libjin/Graphics/Drawable.h') 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; } -- cgit v1.1-26-g67d0