保存当前的绘图上下文。
恢复之前保存的绘图上下文。
const ctx = wx.createcanvascontext('mycanvas')
// save the default fill style
ctx.save()
ctx.setfillstyle('red')
ctx.fillrect(10, 10, 150, 100)
// restore to the previous saved state
ctx.restore()
ctx.fillrect(50, 50, 150, 100)
ctx.draw()