Created attachment 41581 [details] Testcase When a type 7 shading folds over itself, poppler lets an incorrect solution be the topmost one. The ISO3200 specifies that when a point has multiple solutions in the (u,v) parameters, the one with the highest v value is on top and in case of multiple points with the same v value, the one with highest u.
It looks like the bug is in the implementation of Gfx::fillPatch. It subdivides the patch in 2 parts in each parameter direction and uses recursion on each of the 4 subpatches. This makes it possible for some points of a subpatch to be drawn over the same points in another subpatch and this can lead to incorrect rendering. If you want to keep the recursion structure, you should remember that you can safely subdivide only in the v direction. If you want to subdivide along u, you need to check some additional conditions.
Fixed in cairo backend.
-- 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/219.
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.