api-typings icon indicating copy to clipboard operation
api-typings copied to clipboard

Canvas.drawImage的API和实际不符

Open eos3tion opened this issue 4 years ago • 0 comments
trafficstars

https://github.com/wechat-miniprogram/api-typings/blob/master/types/wx/lib.wx.api.d.ts#L7358 中api写的第一个参数ImageSourcestring
实际为 Image 对象,必须先用

const img = canvas.createImage();

创建Image对象后,再使用将此img对象进行绘制

eos3tion avatar Dec 11 '20 15:12 eos3tion