Commit d4039633 by doszhang

dos

parent e9968cf6
......@@ -305,25 +305,25 @@ function drawImage(ctx, myCanvas, img, imgInfo) {
}
function drawNum() {
posterCtx.font = 'normal ' + '24px normal';
posterCtx.font = 'normal ' + '48px normal';
let text1 = '已有';
let text2 = '人发起承诺';
let text1Width = posterCtx.measureText(text1).width;
let text2Width = posterCtx.measureText(text2).width;
posterCtx.font = 'normal ' + '40px normal';
posterCtx.font = 'normal ' + '80px 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;
let totalWidth = text1Width + 10 * 2 + numWidth + 6 * 2 + text2Width;
let text1X = 212 * 2 - totalWidth / 2;
let numX = text1X + text1Width + 10 * 2;
let text2X = numX + numWidth + 6 * 2;
txtDraw(posterCtx, window.num, '#fff', numX, 557);
txtDraw(posterCtx, window.num, '#fff', numX, 557 * 2);
posterCtx.font = 'normal ' + '24px normal';
txtDraw(posterCtx, text1, '#fff', text1X, 557);
txtDraw(posterCtx, text2, '#fff', text2X, 557);
posterCtx.font = 'normal ' + '48px normal';
txtDraw(posterCtx, text1, '#fff', text1X, 557 * 2);
txtDraw(posterCtx, text2, '#fff', text2X, 557 * 2);
}
function drawUserInfo(name, business, fontsize, fontweight) {
......
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