Canvas.save()存储画布当前的状态,Canvas.restore()恢复画布的旋转缩放之前的状态,到之前save时画布的状态 restore()只返回上一次save()的状态 ,不跳跃返回。
api解释: Canvas.save()
Saves the current matrix and clip onto a private stack.
api解释:Canvas.restore()
This call balances a previous call to save(), and is used to remove all modifications to the matrix/clip state since the last save call. It is an error to call restore() more times than save() was called.
要注意restore()方法跟save()方法之间的对应。