mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fix transformations when painting image masks and tiling patterns.
Previously, when we filled image masks we didn't copy over the current transformation, this caused patterns to be misaligned when painted. Now we create a temporary canvas with the mask and have the transform copied over and offset it relative to where the mask would be painted. We also weren't properly offsetting tiling patterns. This isn't usually noticeable since patters repeat, but in the case of #13561 the pattern is only drawn once and has to be in the correct position to line up with the mask image. These fixes broke #11473, but highlighted that we were drawing that correctly by accident and not correctly handling negative bounding boxes on tiling patterns. Fixes #6297, #13561, #13441 Partially fixes #1344 (still blurry but boxes are in correct position now)
This commit is contained in:
parent
9de0916fd4
commit
a52c0c6988
5 changed files with 253 additions and 179 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -206,6 +206,7 @@
|
|||
!issue11403_reduced.pdf
|
||||
!issue2074.pdf
|
||||
!scan-bad.pdf
|
||||
!issue13561_reduced.pdf
|
||||
!bug847420.pdf
|
||||
!bug860632.pdf
|
||||
!bug894572.pdf
|
||||
|
|
BIN
test/pdfs/issue13561_reduced.pdf
Normal file
BIN
test/pdfs/issue13561_reduced.pdf
Normal file
Binary file not shown.
|
@ -878,6 +878,12 @@
|
|||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue13561_reduced",
|
||||
"file": "pdfs/issue13561_reduced.pdf",
|
||||
"md5": "e68c315d6349530180dd90f93027147e",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue5202",
|
||||
"file": "pdfs/issue5202.pdf",
|
||||
"md5": "bb9cc69211112e66aab40828086a4e5a",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue