help understanding canvas

Dubbsta

Active Member
Joined
Jul 13, 2017
can someone explain canvas a bit for me. whats the purpose of indivual canvases, does it act as layers? does every image have to go in its own canvas? can everything be drawn on one canvas?

the example in docs is kinda tricky for me. it sets up a canvas for an image: imageCanvas(image)
but then calls drawimage with a different canvas: windowCanvas drawImage image.
and how exactly is an image loaded ???

is there a nother language with canvas that might have more tutorials ?
 
Last edited:

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Hi Dubbsta,

a canvas is basically a render target. They are not layers, but you can render/draw them on top of each other and so they are layered.

does every image have to go in its own canvas? can everything be drawn on one canvas?
No, you can work perfectly with one canvas. Only if you want to render into an image, you need more canvas.

is there a nother language with canvas that might have more tutorials ?
Mmmh, maybe M2?
 
Top Bottom