Skip to content

Commit

Permalink
Fix transformations when painting image masks and tiling patterns.
Browse files Browse the repository at this point in the history
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 mozilla#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 mozilla#11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes mozilla#6297,  mozilla#13561, mozilla#13441

Partially fixes mozilla#1344 (still blurry but boxes are in correct position now)
  • Loading branch information
brendandahl authored and bh213 committed Jun 3, 2022
1 parent 52721c0 commit 7966fa9
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 179 deletions.
Loading

0 comments on commit 7966fa9

Please sign in to comment.