GNOME Bugzilla – Bug 557345
Incorrect use of nonzero fill rule for clip paths
Last modified: 2017-12-13 17:34:38 UTC
Please describe the problem: When defining more than one element inside a clip path, if one of them circles an area clockwise and the other counterclockwise, then that area is considered to be empty on said clip path. This would be correct on a normal path, but as far as I'm aware, not on a clip path. Steps to reproduce: Run rsvg on the following file: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100"> <defs> <clipPath id="one"> <polygon points="0,0 0,100 100,100 100,0" id="pol"/> <use xlink:href="#pol" transform="matrix(-1,0,0,1,100,0)"/> </clipPath> </defs> <rect width="100" height="100" x="0" y="0" clip-path="url(#one)" fill="#000"/> </svg> Note that the clip path is only restricting the rectangle to the size of the SVG image - so it should have no effect on how the rectangle is displayed. Actual results: The resulting PNG file is a 100×100 transparent image. Expected results: The resulting PNG file should have been a 100×100 completely black image. Does this happen every time? Yes. Other information:
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME'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.gnome.org/GNOME/librsvg/issues/25.