Bug 32791

Summary: Incorrect rendering of type 7 shading
Product: poppler Reporter: Andrea Canciani <ranma42>
Component: splash backendAssignee: 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: Testcase

Description Andrea Canciani 2011-01-03 01:15:08 UTC
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.
Comment 1 Andrea Canciani 2011-01-24 01:51:05 UTC
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.
Comment 2 Carlos Garcia Campos 2011-01-26 03:04:22 UTC
Fixed in cairo backend.
Comment 3 GitLab Migration User 2018-08-20 22:09:09 UTC
-- 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.