优化fillBoldText

This commit is contained in:
ckcz123 2020-10-30 19:47:00 +08:00
parent aded71347f
commit be2e55aea2

View File

@ -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);
} }