Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a duplicated reference test (PR 12812 follow-up) #12863

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/display/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,9 +1368,8 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
} else {
const lineWidth = this.getSinglePixelWidth();
if (lineWidth === -1) {
// The current transform will transform a square pixel into
// a parallelogramm where both heights are lower than 1 and
// not equal.
// The current transform will transform a square pixel into a
// parallelogram where both heights are lower than 1 and not equal.
ctx.save();
ctx.resetTransform();
ctx.lineWidth = 1;
Expand Down Expand Up @@ -2655,7 +2654,7 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
if (this._cachedGetSinglePixelWidth === null) {
// If transform is [a b] then a pixel (square) is transformed
// [c d]
// into a parallelogramm: its area is the abs value of determinant.
// into a parallelogram: its area is the abs value of the determinant.
// This parallelogram has 2 heights:
// - Area / |col_1|;
// - Area / |col_2|.
Expand All @@ -2669,18 +2668,18 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
const sqNorm1 = m[0] ** 2 + m[2] ** 2;
const sqNorm2 = m[1] ** 2 + m[3] ** 2;
if (sqNorm1 !== sqNorm2 && sqNorm1 > sqDet && sqNorm2 > sqDet) {
// The parallelogramm isn't a losange and both heights
// The parallelogram isn't a losange and both heights
// are lower than 1 so the resulting line width must be 1
// but it cannot be achieved with one scale: when scaling a pixel
// we'll get a rectangle (see isssue #12295).
// we'll get a rectangle (see issue #12295).
this._cachedGetSinglePixelWidth = -1;
} else if (sqDet > Number.EPSILON ** 2) {
// The multiplication by the constant 1.000001 is here to have
// The multiplication by the constant 1.0000001 is here to have
// a number slightly greater than what we "exactly" want.
this._cachedGetSinglePixelWidth =
Math.sqrt(Math.max(sqNorm1, sqNorm2) / sqDet) * 1.0000001;
} else {
// Matrix is non-invertible.x
// Matrix is non-invertible.
this._cachedGetSinglePixelWidth = 1;
}
}
Expand Down
1 change: 0 additions & 1 deletion test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
!issue3371.pdf
!issue2956.pdf
!issue2537r.pdf
!issue12810.pdf
!issue269_1.pdf
!bug946506.pdf
!issue3885.pdf
Expand Down
6 changes: 0 additions & 6 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4342,12 +4342,6 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue12810",
"file": "pdfs/issue12810.pdf",
"md5": "585e19781308603dd706f941b1ace774",
"rounds": 1,
"type": "eq"
},
{ "id": "issue2956",
"file": "pdfs/issue2956.pdf",
"md5": "d8f68cbbb4bf54cde9f7f878acb6d7cd",
Expand Down