Xgoff wrote:basically, it's a really hacky method of taking a screenshot (and pushing it, with some other information, onto a stack), clearing the screen, drawing the requested canvas' image as it was the last time it was used, allowing further draw calls to be done on this surface until another setCanvas() call. you basically repeat this until you have a no-argument setCanvas() call, in which case you save the current image to whichever canvas was used last, then clear the stack and restore the background. there's more involved ('taking a screenshot' is simplifying this a lot), but that's more or less the process
so in effect, you're using the main framebuffer as scratch space while you're drawing into the current "canvas"
it's still not entirely correct from some of the tests i have done on a few of the canvas-using .love files i've seen on here, so the process still needs some tweaking
Think I'm getting closer to what's going on - please correct if not quite correct.
newScreenshot() creates an image from the data in the background buffer.
OK, this is what I think you are doing (made simple for people with limited IQs):
1. take a screenshot of data in background buffer => original data image
2. clear the background buffer => love.graphics.clear()
3. draw something to the background buffer
4. take a screenshot of the new drawing => drawing image
5. clear the buffer => love.graphics.clear()
6. reload original data to buffer <= original data image
7. switch buffers => love.draw()
8. use drawing image as a fakecanvas
If this is even close to correct, how are different size fakecanvas created as the buffers are screen size?
Hope I'm not too far out in left field.