From e72c8d1bbd0d74dcf4a4832d0352f5f8211fc343 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Dec 2022 11:48:06 +0100 Subject: Sprite: add get_size, which returns the texture size and takes into account scaling --- include/mglpp/graphics/Sprite.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/mglpp/graphics/Sprite.hpp b/include/mglpp/graphics/Sprite.hpp index 9453c30..21b2a41 100644 --- a/include/mglpp/graphics/Sprite.hpp +++ b/include/mglpp/graphics/Sprite.hpp @@ -20,6 +20,8 @@ namespace mgl { void set_position(vec2f position) override; void set_color(Color color) override; vec2f get_position() const override; + vec2f get_size() const; + void set_scale(vec2f scale); void set_scale(float scale); void set_size(vec2f size); -- cgit v1.2.3