canvas怎么可以使图片全部显示出来,跪求方法
var pw = wx.getSystemInfoSync().windowWidth;
var ph = wx.getSystemInfoSync().windowHeight;
var headImage = app.globalData.userInfo.avatarUrl;
var content = wx.createContext(“qrcodeCanvas”);
content.drawImage(“…/…/images/qrcode_banner.jpg”, 0, 0, pw, pw / 104 * 59);
content.drawImage(“…/…/images/ewm.png”, pw / 2 - pw / 2 / 2, ph / 16 * 12 - ph / 16 * 4, pw / 2, pw / 2);//二维码图片
content.restore()
content.drawImage(headImage, pw / 2 - pw / 8 / 2, ph / 16 * 12 - ph / 16 * 4 + pw / 2 / 2 - pw / 8 / 2, pw / 8, pw / 8);//二维码中间的图片
content.setStrokeStyle(‘black’);
content.setFontSize(16);
content.setTextAlign(‘center’)
content.fillText(“长按图片识别二维码”, pw / 2, ph / 16 * 12 - ph / 16 * 4 + pw / 2 + 25)
wx.drawCanvas({
canvasId: “qrcodeCanvas”,
actions: content.getActions(),
reserve: true
})
二维码下面还有一张图片,加载太快了就到下面去了,怎么把它弄上来
