绘图中的clip()方法失效
反馈一个 Bug ,fillRect之后clip失效 [代码]const ctx = wx.createCanvasContext([代码][代码]'myCanvas'[代码][代码])[代码][代码] [代码][代码]wx.downloadFile({[代码][代码] [代码][代码]url: [代码][代码]'http://is5.mzstatic.com/image/thumb/Purple128/v4/75/3b/90/753b907c-b7fb-5877-215a-759bd73691a4/source/50x50bb.jpg'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]ctx.fillRect(10, 10, 150, 75)[代码][代码] [代码][代码]ctx.draw()[代码][代码] [代码] [代码] [代码][代码]ctx.save()[代码][代码] [代码][代码]ctx.beginPath()[代码][代码] [代码][代码]ctx.arc(50, 50, 25, 0, 2 * Math.PI)[代码][代码] [代码][代码]ctx.clip()[代码][代码] [代码][代码]ctx.drawImage(res.tempFilePath, 25, 25)[代码][代码] [代码][代码]ctx.restore()[代码][代码] [代码][代码]ctx.draw([代码][代码]true[代码][代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][图片] [代码]const ctx = wx.createCanvasContext([代码][代码]'myCanvas'[代码][代码])[代码][代码] [代码][代码]wx.downloadFile({[代码][代码] [代码][代码]url: [代码][代码]'http://is5.mzstatic.com/image/thumb/Purple128/v4/75/3b/90/753b907c-b7fb-5877-215a-759bd73691a4/source/50x50bb.jpg'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]// ctx.fillRect(10, 10, 150, 75)[代码][代码] [代码][代码]// ctx.draw()[代码] [代码] [代码][代码]ctx.save()[代码][代码] [代码][代码]ctx.beginPath()[代码][代码] [代码][代码]ctx.arc(50, 50, 25, 0, 2 * Math.PI)[代码][代码] [代码][代码]ctx.clip()[代码][代码] [代码][代码]ctx.drawImage(res.tempFilePath, 25, 25)[代码][代码] [代码][代码]ctx.restore()[代码][代码] [代码][代码]ctx.draw([代码][代码]true[代码][代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][图片]