Commit 9154dd15 by doszhang

dos

parent 2cbcaf63
...@@ -399,20 +399,47 @@ function txtDraw(ctx, content, fontsize, fontweight, color) { ...@@ -399,20 +399,47 @@ function txtDraw(ctx, content, fontsize, fontweight, color) {
{ {
x = 255; x = 255;
y = 276; y = 276;
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px zkkh';
ctx.fillStyle = color;
ctx.fillText(content, x, y);
} }
else if(contentArr.length == 2) else if(contentArr.length == 2)
{ {
x = 236; x = 236;
y = 276; y = 276;
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px zkkh';
ctx.fillStyle = color;
ctx.fillText(content, x, y);
} }
x = x * 2; else if(contentArr.length == 3)
y = y * 2; {
fontsize = fontsize * 2; x = 236;
ctx.font = fontweight + ' '+fontsize+'px zkkh'; y = 259;
x = x * 2;
y = y * 2;
fontsize = fontsize * 2;
ctx.font = fontweight + ' '+fontsize+'px zkkh';
ctx.fillStyle = color; ctx.fillStyle = color;
ctx.fillText(content, x, y); ctx.fillText(contentArr[0] + contentArr[1], x, y);
x = 255;
y = 302;
x = x * 2;
y = y * 2;
ctx.fillText(contentArr[2], x, y);
}
// var contentArr = content.split(''); // var contentArr = content.split('');
......
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