const image = wx.createImage()
const imgX = canvas.width / 2 - 50
let imgY = 500
image.onload = function () {
context.drawImage(image, imgX, imgY)
}
image.src = 'img/plane.png'
这段代码已经无法显示图片
网友回复
undefined:
亮子?:
wx.createImage ?有这个
const image = wx.createImage()
const imgX = canvas.width / 2 - 50
let imgY = 500
image.onload = function () {
context.drawImage(image, imgX, imgY)
}
image.src = 'img/plane.png'
这段代码已经无法显示图片
wx.createImage ?有这个