手册
目录
收藏841
分享
阅读90452
更新时间2022-04-11
保存当前的绘图上下文。
恢复之前保存的绘图上下文。
const ctx = wx.createCanvasContext('myCanvas')// save the default fill stylectx.save()
ctx.setFillStyle('red')
ctx.fillRect(10, 10, 150, 100)// restore to the previous saved statectx.restore()
ctx.fillRect(50, 50, 150, 100)
ctx.draw()
相关
视频
RELATED VIDEOS
科技资讯
精选课程
共5课时
17.2万人学习
共49课时
77万人学习
共29课时
61.7万人学习
共25课时
39.3万人学习
共43课时
70.9万人学习
共25课时
61.6万人学习
共22课时
23万人学习
共28课时
33.9万人学习
共89课时
125万人学习