单项选择题

以下哪个方法可以保存画布描边颜色、填充颜色、旋转等状态?()

A.ctx.save()
B.ctx.restore()
C.ctx.beginPath()
D.ctx.closePath()