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:
commit
838909f8c1
@ -1770,7 +1770,7 @@ class CanvasGraphics {
|
|||||||
// parallelogram where both heights are lower than 1 and not equal.
|
// parallelogram where both heights are lower than 1 and not equal.
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.resetTransform();
|
ctx.resetTransform();
|
||||||
ctx.lineWidth = Math.round(this._combinedScaleFactor);
|
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
} else {
|
} else {
|
||||||
@ -2040,7 +2040,7 @@ class CanvasGraphics {
|
|||||||
) {
|
) {
|
||||||
if (resetLineWidthToOne) {
|
if (resetLineWidthToOne) {
|
||||||
ctx.resetTransform();
|
ctx.resetTransform();
|
||||||
ctx.lineWidth = Math.round(this._combinedScaleFactor);
|
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
|
||||||
}
|
}
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
@ -2060,7 +2060,7 @@ class CanvasGraphics {
|
|||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.moveTo(x, y);
|
ctx.moveTo(x, y);
|
||||||
ctx.resetTransform();
|
ctx.resetTransform();
|
||||||
ctx.lineWidth = Math.round(this._combinedScaleFactor);
|
ctx.lineWidth = Math.floor(this._combinedScaleFactor);
|
||||||
ctx.strokeText(character, 0, 0);
|
ctx.strokeText(character, 0, 0);
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
} else {
|
} else {
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -471,6 +471,7 @@
|
|||||||
!issue11442_reduced.pdf
|
!issue11442_reduced.pdf
|
||||||
!issue11549_reduced.pdf
|
!issue11549_reduced.pdf
|
||||||
!issue8097_reduced.pdf
|
!issue8097_reduced.pdf
|
||||||
|
!bug1743245.pdf
|
||||||
!quadpoints.pdf
|
!quadpoints.pdf
|
||||||
!transparent.pdf
|
!transparent.pdf
|
||||||
!issue13931.pdf
|
!issue13931.pdf
|
||||||
|
BIN
test/pdfs/bug1743245.pdf
Normal file
BIN
test/pdfs/bug1743245.pdf
Normal file
Binary file not shown.
@ -4042,6 +4042,12 @@
|
|||||||
"type": "eq",
|
"type": "eq",
|
||||||
"annotations": true
|
"annotations": true
|
||||||
},
|
},
|
||||||
|
{ "id": "bug1743245",
|
||||||
|
"file": "pdfs/bug1743245.pdf",
|
||||||
|
"md5": "01eadf118ec05fe02e91db63536d50f6",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "issue1002",
|
{ "id": "issue1002",
|
||||||
"file": "pdfs/issue1002.pdf",
|
"file": "pdfs/issue1002.pdf",
|
||||||
"md5": "af62d6cd95079322d4af18edd960d15c",
|
"md5": "af62d6cd95079322d4af18edd960d15c",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user