Test case attached. The problem is CairoOutputDev::setSoftMask creates in image mask using the clip extents transformed to device space. There are two bugs: - The transformation of clip extents to device space is only transforming two corners then getting the bounding box around the two corners. If, for example, the clip extents is a square rotated 45 degrees, the bounding box around the two transformed corners is now a straight line. - The mask surface origin starts at the clip extents origin, not (0,0). But there is no translation applied when painting the source onto the mask surface to compensate for the non zero origin.
Created attachment 51331 [details] test case
Created attachment 51332 [details] [review] fix setSoftMask Patch to fix this bug.
Thanks for the patch!. I've run the regtests with my pdfs and while it fixes some documents, it breaks others too. http://acroeng.adobe.com/Test_Files/images/a_Opera.pdf http://acroeng.adobe.com/Test_Files/OCG/ClarityOCGs.pdf - It removes a shadow discover_ireland_Boyne-Valley-Brochure-Interactive-V2-0-.pdf - It fixes this document, I don't remember where I got this, so I don't know whether I can share it or not. Just let me know if you want it. http://www.investigatemagazine.com/tgif8aug08.pdf - It fixes this one too (see diffs in page 8)
Created attachment 51403 [details] [review] fix softmask Updated patch to fix regression in previous patch.
*** Bug 32117 has been marked as a duplicate of this bug. ***
Created attachment 51792 [details] [review] fix softmask bug when the ctm changes I've found another bug in the cairo softmask code. It was not correctly handling the case where the ctm changes after the mask is created and before calling cairo_mask(). The attached patch fixes this. This fixes bug 28637. It also makes the ducks and roses pdf in bug 22098 render almost correctly. I'm still investigating the remaining issues with the ducks and roses pdf but it appears the problem is in cairo, not poppler.
Created attachment 51874 [details] [review] save mask matrix on mask stack
Created attachment 51875 [details] [review] ensure mask matrix is always set when mask is set
Created attachment 52110 [details] [review] 0005-cairo-implement-transfer-function-in-setSoftMask.patch Implement the transfer function in setSoftMask.
Patches committed.
*** Bug 28637 has been marked as a duplicate of this bug. ***
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.