modules/assets: add a wrapper for getDimensions in texture object
This commit is contained in:
parent
ae75fc46a0
commit
6f1f7af711
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue