modules/assets: add a wrapper for getDimensions in texture object

This commit is contained in:
Kazhnuz 2019-03-18 17:20:13 +01:00
parent ae75fc46a0
commit 6f1f7af711

View file

@ -42,6 +42,10 @@ function Texture:new(filename)
self.mask = love.graphics.newImage( maskData ) self.mask = love.graphics.newImage( maskData )
end end
function Texture:getDimensions()
return self.image:getDimensions()
end
function Texture:draw(x, y, r, sx, sy, ox, oy, kx, ky) 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) love.graphics.draw(self.image, x, y, r, sx, sy, ox, oy, kx, ky)
end end