From 6f1f7af711bc6756404ea4bb0e74f41fd280ac03 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 18 Mar 2019 17:20:13 +0100 Subject: [PATCH] modules/assets: add a wrapper for getDimensions in texture object --- gamecore/modules/assets/texture.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamecore/modules/assets/texture.lua b/gamecore/modules/assets/texture.lua index 96e868b..63313d9 100644 --- a/gamecore/modules/assets/texture.lua +++ b/gamecore/modules/assets/texture.lua @@ -42,6 +42,10 @@ function Texture:new(filename) self.mask = love.graphics.newImage( maskData ) end +function Texture:getDimensions() + return self.image:getDimensions() +end + function Texture:draw(x, y, r, sx, sy, ox, oy, kx, ky) love.graphics.draw(self.image, x, y, r, sx, sy, ox, oy, kx, ky) end