Commit ec7a824e by doszhang

dos

parent c5efea1c
......@@ -287,6 +287,28 @@ function drawImage(ctx, myCanvas, img, imgInfo) {
ctx.restore();
}
function drawNum() {
posterCtx.font = 'normal ' + '24px normal';
let text1 = '已有';
let text2 = '人发起承诺';
let text1Width = posterCtx.measureText(text1).width;
let text2Width = posterCtx.measureText(text2).width;
posterCtx.font = 'normal ' + '40px normal';
let numWidth = posterCtx.measureText(window.num).width;
let totalWidth = text1Width + 10 + numWidth + 6 + text2Width;
let text1X = 212 - totalWidth / 2;
let numX = text1X + text1Width + 10;
let text2X = numX + numWidth + 6;
txtDraw(posterCtx, window.num, numX, 557);
posterCtx.font = 'normal ' + '24px normal';
txtDraw(posterCtx, text1, text1X, 557);
txtDraw(posterCtx, text2, text2X, 557);
}
function drawUserInfo(name, business, fontsize, fontweight) {
// fontsize = fontsize * 2;
posterCtx.font = fontweight + ' ' + fontsize + 'px normal';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment