mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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
4 changed files with 2165 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue