Commit fb2434ad by doszhang

dos

parent c57edf0a
......@@ -282,7 +282,7 @@ function createHeadimg() {
headimgctx.restore();
headimgctx.save();
txtDraw(headimgctx, $('[name=customize]').val(), 326, 485, 82, 'normal', '#fff');
txtDraw(headimgctx, $('[name=customize]').val(), 236, 259, 41, 'normal', '#fff');
headimgctx.restore();
$('#headimg').attr('src',getManBase64(headimgCanvas));
......@@ -393,12 +393,10 @@ function initGame() {
}
function txtDraw(ctx, content, x, y, fontsize, fontweight, color) {
x = x;
y = y;
fontsize = fontsize;
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px zkkh';
var width = ctx.measureText(content).width;
var cx = x - width / 2;
ctx.fillStyle = color;
......
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