Skip to content

Commit 6deb3e1

Browse files
authored
Merge pull request #1938 from Tyriar/1937_uncached_char_top_fix
Align y draw coord with how cache draws it
2 parents ce09ae4 + ecb7f42 commit 6deb3e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderer/BaseRenderLayer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
241241
this._ctx.fillText(
242242
charData[CHAR_DATA_CHAR_INDEX],
243243
x * this._scaledCellWidth + this._scaledCharLeft,
244-
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
244+
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
245245
}
246246

247247
/**
@@ -316,7 +316,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
316316
this._ctx.fillText(
317317
chars,
318318
x * this._scaledCellWidth + this._scaledCharLeft,
319-
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
319+
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
320320
this._ctx.restore();
321321
}
322322

0 commit comments

Comments
 (0)