I use LÖVE 0.11.4, nothing happen, no file created, no error, rights to write.
Code: Select all
function love.load()
canvas = love.graphics.newCanvas(800,600)
love.graphics.setCanvas(canvas)
love.graphics.circle("fill",200,200,100)
-- need to set another Canvas to avoid Canvas:newImageData cannot be called while that Canvas is currently active.
love.graphics.setCanvas()
imagedata = canvas:newImageData()
imagedata:encode("png","test.png")
end
function love.draw()
end