Code: Select all
function love.load(arg, unfilteredArg)
image = love.graphics.newImage('blocks.png')
canvas = love.graphics.newCanvas(1000, 1000)
canvas:renderTo(function ()
love.graphics.draw(image, 0, 0)
end)
end
function love.draw()
love.graphics.draw(canvas)
end
Code: Select all
canvas:renderTo(function ()
local quad = love.graphics.newQuad(0, 0, 100, 100, canvas:getDimensions())
love.graphics.draw(canvas, quad, 100, 100)
end)
Please help me to achieve the purpose.