获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
没报错,但是canvas画不了图片,开发者工具出不来效果
拍照takePhoto返回的tempImagePath无法画布drawImage需求很简单代码也很简单,就是效果出不来,心好累。。。老铁们,怎么办 takePhoto() { this.data.camera.takePhoto({ quality: 'high', success: (res) => { let cv = wx.createCanvasContext("abc"); //canvas-id='abc' let w = this.data.canvasW; //<canvas>宽 let h = this.data.canvasH; cv.drawImage(res.tempImagePath, 0, 0, w, h); //res.tempImagePath是http://tmp/xxx.jpg cv.draw(); } }) },
2018-06-01