优化fillBoldText
This commit is contained in:
parent
aded71347f
commit
be2e55aea2
@ -138,11 +138,9 @@ ui.prototype.fillBoldText = function (name, text, x, y, style, strokeStyle, font
|
|||||||
style = core.arrayToRGBA(style);
|
style = core.arrayToRGBA(style);
|
||||||
if (!strokeStyle) strokeStyle = '#000000';
|
if (!strokeStyle) strokeStyle = '#000000';
|
||||||
strokeStyle = core.arrayToRGBA(strokeStyle);
|
strokeStyle = core.arrayToRGBA(strokeStyle);
|
||||||
ctx.fillStyle = strokeStyle;
|
ctx.strokeStyle = strokeStyle;
|
||||||
ctx.fillText(text, x-1, y-1);
|
ctx.lineWidth = 3;
|
||||||
ctx.fillText(text, x-1, y+1);
|
ctx.strokeText(text, x, y);
|
||||||
ctx.fillText(text, x+1, y-1);
|
|
||||||
ctx.fillText(text, x+1, y+1);
|
|
||||||
ctx.fillStyle = style;
|
ctx.fillStyle = style;
|
||||||
ctx.fillText(text, x, y);
|
ctx.fillText(text, x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user