Allen
Allen

Reputation: 6882

How to get the reference of each time drawn image in canvas?

I have a lot of images to draw into canvas, what I wanna do is do draw stuff one time, and handle every drawn image's visibility in order as slider.

So, is there anyway to get the reference of every image, and then set property like hidden=true|false on it?

Upvotes: 2

Views: 48

Answers (1)

markE
markE

Reputation: 105015

No, html5 canvas does not "remember" where it drew your images so you cannot later reference them to show / hide them. You will have to clear the canvas and redraw the images in their newly desired positions.

Upvotes: 1

Related Questions