feat(screen): add scissoring functions
This commit is contained in:
parent
8e000dbc44
commit
c339129566
1 changed files with 13 additions and 0 deletions
|
@ -81,6 +81,19 @@ function ScreenManager:getDimensions()
|
|||
return self.width, self.height
|
||||
end
|
||||
|
||||
-- SCISSOR FUNCTIONS
|
||||
-- Simple scissor functions
|
||||
|
||||
function ScreenManager:setScissor(x, y, width, height)
|
||||
local x, y = self:getScreenCoordinate(x, y)
|
||||
love.graphics.setScissor(x, y, width*self.data.resolution, height*self.data.resolution)
|
||||
end
|
||||
|
||||
function ScreenManager:resetScissor()
|
||||
love.graphics.setScissor( )
|
||||
end
|
||||
|
||||
|
||||
-- DRAW FUNCTIONS
|
||||
-- Apply draw functions to the scene
|
||||
|
||||
|
|
Loading…
Reference in a new issue