TilingPattern: Reverse transform after painting
This transform resulted in an incorrectly positioned object when the bounding box's upper-left corner did not start at (0,0), because the translation was not reverted. This patch adds the missing transform. The test file (tiling-pattern-box.pdf) is based on the PDF from #2825. All but the first cube (including the PDF data) have been removed. To trigger the bug that is fixed by this commit, I changed the BBox of the first pattern from "[ 0 0 596 842]" to "[90 0 596 842]". Without this patch, the dashed vertical line that intersects the corners at A and E would disappear.
This commit is contained in:
parent
a72a8e921f
commit
d3dc8f16b5
@ -364,6 +364,8 @@ var TilingPattern = (function TilingPatternClosure() {
|
||||
|
||||
graphics.executeOperatorList(operatorList);
|
||||
|
||||
this.ctx.transform(1, 0, 0, 1, x0, y0);
|
||||
|
||||
// Rescale canvas so that the ctx.createPattern call generates a pattern
|
||||
// with the desired size.
|
||||
this.ctx.scale(1 / dimx.scale, 1 / dimy.scale);
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -340,4 +340,5 @@
|
||||
!issue9972-1.pdf
|
||||
!issue9972-2.pdf
|
||||
!issue9972-3.pdf
|
||||
!tiling-pattern-box.pdf
|
||||
!tiling-pattern-large-steps.pdf
|
||||
|
2154
test/pdfs/tiling-pattern-box.pdf
Normal file
2154
test/pdfs/tiling-pattern-box.pdf
Normal file
File diff suppressed because it is too large
Load Diff
@ -2996,6 +2996,14 @@
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "tiling-pattern-box",
|
||||
"file": "pdfs/tiling-pattern-box.pdf",
|
||||
"md5": "09100872824fc14012bd8f9bf4dbc632",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{
|
||||
"id": "tiling-pattern-large-steps",
|
||||
"file": "pdfs/tiling-pattern-large-steps.pdf",
|
||||
|
Loading…
Reference in New Issue
Block a user