const ctx = uni.createCanvasContext('myCanvas');
ctx.clearRect(0,0,that.canvasWidth,that.canvasHeight)
// 绘制海报
ctx.drawImage(posterinfo.path, 0, 0, posterinfo.width, posterinfo.height);
ctx.save();
// 绘制二维码
var codeWidth = 150;
var codeHeight = 150;
var codeX = that.canvasWidth - 25 - codeWidth; //二维码x坐标
var codeY = 25; //二维码y坐标
var arcR = codeWidth / 2;
ctx.beginPath();
ctx.arc(codeX + arcR, codeY + arcR, arcR, 0, 2 * Math.PI);
ctx.setFillStyle('rgba(255,255,255,0.6)');
ctx.fill();
ctx.drawImage(codeinfo.path, codeX, codeY, codeWidth, codeHeight);
先给画布绘制一个底色