Summary: | Blank page when tiling pattern's cell is too far | ||
---|---|---|---|
Product: | poppler | Reporter: | Marek Kasik <mkasik> |
Component: | cairo backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
reproducer
Fix tiling patterns when pattern cell is too far Fix tiling patterns when pattern cell is too far |
Description
Marek Kasik
2018-04-05 14:21:22 UTC
Created attachment 138622 [details] [review] Fix tiling patterns when pattern cell is too far Given that this works fine in the Splash and PS backends and only seems to fail on the Cairo backend, how hard is to get a fix that doesn't affect the other rendering pipelines? Created attachment 138652 [details] [review] Fix tiling patterns when pattern cell is too far (In reply to Albert Astals Cid from comment #2) > Given that this works fine in the Splash and PS backends and only seems to > fail on the Cairo backend, how hard is to get a fix that doesn't affect the > other rendering pipelines? It was not that hard as I thought at the end (having already the patch for Gfx helped). Here is a patch which fixes the issue in Cairo backend directly. It solves the issue by modifying of cairo pattern matrix so that its offset is closer to the path filled by the pattern. Hi, I would like to push the patch downstream but it changes quite complicated part. Could you have a look at it whether it looks correct? Thanks I'm not sure if I understand how this works. Can you tell me if I've got this right? You're transforming the translation components of pmat by pmat^(-1) to find how far that point is in the pattern's coordinate system. You set xoffset and yoffset to the number of repetitions of the pattern that are required to get there. Then shift pattern_matrix over by that amount? Hi, I'm sorry for late answer. (In reply to Jason Crain from comment #5) > I'm not sure if I understand how this works. Can you tell me if I've got > this right? I think that you've got this right :). > You're transforming the translation components of pmat by pmat^(-1) to find > how far that point is in the pattern's coordinate system. You set xoffset > and yoffset to the number of repetitions of the pattern that are required to > get there. Then shift pattern_matrix over by that amount? Yes, I have to shift the pattern_matrix so that when it is applied to the cairo context in "cairo_transform (cairo, &pattern_matrix)" we get closer to (0,0). Otherwise, cairo tries to allocate huge bitmap for the pattern. I've tested the patch also for different types of translations (scale, skew and rotation). -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/190. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.