Commit 76cd9ba8 by doszhang

dos

parent fb2434ad
......@@ -282,7 +282,8 @@ function createHeadimg() {
headimgctx.restore();
headimgctx.save();
txtDraw(headimgctx, $('[name=customize]').val(), 236, 259, 41, 'normal', '#fff');
// 236, 259,
txtDraw(headimgctx, $('[name=customize]').val(), 41, 'normal', '#fff');
headimgctx.restore();
$('#headimg').attr('src',getManBase64(headimgCanvas));
......@@ -392,7 +393,13 @@ function initGame() {
$('.customize').hide();
}
function txtDraw(ctx, content, x, y, fontsize, fontweight, color) {
function txtDraw(ctx, content, fontsize, fontweight, color) {
var contentArr = content.split('');
if(contentArr.length == 1)
{
x = 255;
y = 282;
}
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
......
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