1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #14491 from quaoaris/lines-rendered-too-thick

fix for lines (stroke) are rendered too thick  (Bug 1743245)
This commit is contained in:
calixteman 2022-01-27 18:46:26 +01:00 committed by GitHub
commit 838909f8c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View file

@ -1770,7 +1770,7 @@ class CanvasGraphics {
// parallelogram where both heights are lower than 1 and not equal.
ctx.save();
ctx.resetTransform();
ctx.lineWidth = Math.round(this._combinedScaleFactor);
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
ctx.stroke();
ctx.restore();
} else {
@ -2040,7 +2040,7 @@ class CanvasGraphics {
) {
if (resetLineWidthToOne) {
ctx.resetTransform();
ctx.lineWidth = Math.round(this._combinedScaleFactor);
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
}
ctx.stroke();
}
@ -2060,7 +2060,7 @@ class CanvasGraphics {
ctx.save();
ctx.moveTo(x, y);
ctx.resetTransform();
ctx.lineWidth = Math.round(this._combinedScaleFactor);
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
ctx.strokeText(character, 0, 0);
ctx.restore();
} else {