You misinterpret what save does. It saves the state of the canvas, which is affected by rotate , translate , scale , etc. It does not save any actual canvas contents. If you want to save what is actually on the canvas, try saving it in a hidden canvas. Assuming you added a hidden canvas to html and got its context object ( canvas2 ), the following should save it:
canvas2.drawImage(canvas, 0, 0)
And then, to restore it:
canvas.drawImage(canvas2, 0, 0)
Aaron dufour
source share