|
1982| 5
|
[有事请教] 装备名字太长之后 显示的文字被挤压变瘦 |
|
悬赏20星屑已解决
最佳答案Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
// [Note] Different browser makes different rendering with
// textBaseline == 'top'. So we use 'alphabetic' here.
const context = this.context;
const alpha = context.globalAlpha;
maxWidth = maxWidth || 0xffffffff;
let tx = x;
let ty = Math.round(y + lineHeight / 2 + this.fontSize * 0.35);
...
| ||
| ||
| ||
| ||
| ||