Support strikethrough text style

This commit is contained in:
Simon Lamon
2021-05-15 17:35:23 +02:00
parent 873dd76167
commit d19a740825
10 changed files with 65 additions and 11 deletions
+7 -2
View File
@@ -215,7 +215,7 @@ export class TextRenderLayer extends BaseRenderLayer {
return;
}
this._drawChars(cell, x, y);
if (cell.isUnderline()) {
if (cell.isUnderline() || cell.isStrikethrough()) {
this._ctx.save();
if (cell.isInverse()) {
@@ -244,7 +244,12 @@ export class TextRenderLayer extends BaseRenderLayer {
}
}
this._fillBottomLineAtCells(x, y, cell.getWidth());
if (cell.isStrikethrough()) {
this._fillMiddleLineAtCells(x, y, cell.getWidth());
}
if (cell.isUnderline()) {
this._fillBottomLineAtCells(x, y, cell.getWidth());
}
this._ctx.restore();
}
});