Commit cab2017d by doszhang

dos

parent c17ed73b
......@@ -310,7 +310,7 @@ function createPoster() {
$('.upload-page').hide();
$('.poster-page').show();
txtDraw(posterCtx, username, '#fff', 460 * 2, 472 * 2, 90 * 2);
txtDraw(posterCtx, username, '#fff', 460 * 2, 531 * 2, 90 * 2);
$('.show-img').append('<img class="showimg" />');
$('.showimg').attr('src', getManBase64(uploadCanvas));
......@@ -544,8 +544,10 @@ function getX(name, business) {
function txtDraw(ctx, content, color, x, y, fontsize) {
ctx.font = 'bolder ' + fontsize + 'px zkkh';
var width = ctx.measureText(content).width;
var cx = x - width / 2;
ctx.fillStyle = color;
ctx.fillText(content, x, y);
ctx.fillText(content, cx, y);
}
function getManBase64(canvas) {
......
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