I have a question(s) about the canvas example (see link below):
1.
Code: Select all
love.graphics.setCanvas(canvas)
2.
Code: Select all
love.graphics.setBlendMode('alpha')
I thank you for your time and happy new year!
And yes I have checked the wiki thoroughly.
https://www.love2d.org/wiki/canvas
[EDIT]
thanks for clearing it up for me but I now have some new questions.
I would make another thread about it but I think that the new questions I have are similar to each other.
1. A mentor of mine said that canvases draws it to an offscreen object (let's call it canvas object) and that got me thinking:
Does the canvas function work like like a layer in Photoshop?
You have this canvas object on the screen that you collect everything on and if you want you can erase it to start a new one.
(Let me know if you want me to clear it up what I mean with it)
2. I have played around with the example for a while and started to see some similarities with something:
Code: Select all
--Does this:
love.graphics.setCanvas(canvas)
love.graphics.setCanvas()
--work similar to:
function love.draw()
end
does setCanvas(canvas) and setCanvas() work like a function within a function? like what I did in a example function love.draw() and end.
Am right? or am I way wrong?