android - Why do we use canvas.save or canvas.restore? -
I know what it does. If I never use it, then I can see the difference in alignment, sometimes I do not. My question is, if the state was saved in the past, then why did the changes made after saving it and why it was not done before it was restored? Why will the changes remain?
canvas save
and canvas.restore
Undo things like rotation and translation Do not undo the drawing on the canvas Android canvas works similar to the HTML5 canvas, so that you can consider the need for more clarification.
Comments
Post a Comment