Merge pull request #1938 from Tyriar/1937_uncached_char_top_fix
Align y draw coord with how cache draws it
This commit is contained in:
@@ -241,7 +241,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
|
|||||||
this._ctx.fillText(
|
this._ctx.fillText(
|
||||||
charData[CHAR_DATA_CHAR_INDEX],
|
charData[CHAR_DATA_CHAR_INDEX],
|
||||||
x * this._scaledCellWidth + this._scaledCharLeft,
|
x * this._scaledCellWidth + this._scaledCharLeft,
|
||||||
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
|
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -316,7 +316,7 @@ export abstract class BaseRenderLayer implements IRenderLayer {
|
|||||||
this._ctx.fillText(
|
this._ctx.fillText(
|
||||||
chars,
|
chars,
|
||||||
x * this._scaledCellWidth + this._scaledCharLeft,
|
x * this._scaledCellWidth + this._scaledCharLeft,
|
||||||
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
|
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
|
||||||
this._ctx.restore();
|
this._ctx.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user