Is it possible to go back after I use drawImage
?
Example:
I draw an image and them overdraw another. I want to delete the first image and, on the clear surface, draw a new image.
Is it possible?
Is it possible to go back after I use drawImage
?
Example:
I draw an image and them overdraw another. I want to delete the first image and, on the clear surface, draw a new image.
Is it possible?
if you want to undo drawImage changes, you must save canvas data before doing drawImage like:
tmp = canvas.getContext("2d").getImageData(0, 0, with, height);
//do changes here
canvas.getContext("2d").putImageData(tmp , 0, 0);
//here changes will be lost
this is unswer to the title, question content was not clear for me