Merge pull request #12863 from Snuffleupagus/pr-12812-followup
Remove a duplicated reference test (PR 12812 follow-up)
This commit is contained in:
commit
d9df96d299
@ -1368,9 +1368,8 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
} else {
|
} else {
|
||||||
const lineWidth = this.getSinglePixelWidth();
|
const lineWidth = this.getSinglePixelWidth();
|
||||||
if (lineWidth === -1) {
|
if (lineWidth === -1) {
|
||||||
// The current transform will transform a square pixel into
|
// The current transform will transform a square pixel into a
|
||||||
// a parallelogramm where both heights are lower than 1 and
|
// parallelogram where both heights are lower than 1 and not equal.
|
||||||
// not equal.
|
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.resetTransform();
|
ctx.resetTransform();
|
||||||
ctx.lineWidth = 1;
|
ctx.lineWidth = 1;
|
||||||
@ -2655,7 +2654,7 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
if (this._cachedGetSinglePixelWidth === null) {
|
if (this._cachedGetSinglePixelWidth === null) {
|
||||||
// If transform is [a b] then a pixel (square) is transformed
|
// If transform is [a b] then a pixel (square) is transformed
|
||||||
// [c d]
|
// [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:
|
// This parallelogram has 2 heights:
|
||||||
// - Area / |col_1|;
|
// - Area / |col_1|;
|
||||||
// - Area / |col_2|.
|
// - Area / |col_2|.
|
||||||
@ -2669,18 +2668,18 @@ const CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
const sqNorm1 = m[0] ** 2 + m[2] ** 2;
|
const sqNorm1 = m[0] ** 2 + m[2] ** 2;
|
||||||
const sqNorm2 = m[1] ** 2 + m[3] ** 2;
|
const sqNorm2 = m[1] ** 2 + m[3] ** 2;
|
||||||
if (sqNorm1 !== sqNorm2 && sqNorm1 > sqDet && sqNorm2 > sqDet) {
|
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
|
// are lower than 1 so the resulting line width must be 1
|
||||||
// but it cannot be achieved with one scale: when scaling a pixel
|
// 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;
|
this._cachedGetSinglePixelWidth = -1;
|
||||||
} else if (sqDet > Number.EPSILON ** 2) {
|
} 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.
|
// a number slightly greater than what we "exactly" want.
|
||||||
this._cachedGetSinglePixelWidth =
|
this._cachedGetSinglePixelWidth =
|
||||||
Math.sqrt(Math.max(sqNorm1, sqNorm2) / sqDet) * 1.0000001;
|
Math.sqrt(Math.max(sqNorm1, sqNorm2) / sqDet) * 1.0000001;
|
||||||
} else {
|
} else {
|
||||||
// Matrix is non-invertible.x
|
// Matrix is non-invertible.
|
||||||
this._cachedGetSinglePixelWidth = 1;
|
this._cachedGetSinglePixelWidth = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -316,7 +316,6 @@
|
|||||||
!issue3371.pdf
|
!issue3371.pdf
|
||||||
!issue2956.pdf
|
!issue2956.pdf
|
||||||
!issue2537r.pdf
|
!issue2537r.pdf
|
||||||
!issue12810.pdf
|
|
||||||
!issue269_1.pdf
|
!issue269_1.pdf
|
||||||
!bug946506.pdf
|
!bug946506.pdf
|
||||||
!issue3885.pdf
|
!issue3885.pdf
|
||||||
|
@ -4342,12 +4342,6 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
{ "id": "issue12810",
|
|
||||||
"file": "pdfs/issue12810.pdf",
|
|
||||||
"md5": "585e19781308603dd706f941b1ace774",
|
|
||||||
"rounds": 1,
|
|
||||||
"type": "eq"
|
|
||||||
},
|
|
||||||
{ "id": "issue2956",
|
{ "id": "issue2956",
|
||||||
"file": "pdfs/issue2956.pdf",
|
"file": "pdfs/issue2956.pdf",
|
||||||
"md5": "d8f68cbbb4bf54cde9f7f878acb6d7cd",
|
"md5": "d8f68cbbb4bf54cde9f7f878acb6d7cd",
|
||||||
|
Loading…
Reference in New Issue
Block a user