Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L
librsvg
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • librsvg
  • Issues
  • #109

Closed
Open
Opened Apr 28, 2015 by bugzilla-migration@bugzilla-migration
  • Report abuse
  • New issue
Report abuse New issue

[BZ#748565] svg with clippath defined after use does not clip properly

Submitted by Thomas Caswell

Link to original bug (#748565)

Description

If the block containing a appears after any elements that use that clip path, they are not clipped. There seems to be nothing in the svg spec which requires that the object refereed to appears above what refers to it. The only place I could find anything about order mentioned was http://www.w3.org/TR/SVG/struct.html#DefsElement which only says that the is 'encouraged' to be a direct child of an ancestor of the node that refers to it.

A simple example of this is (from https://github.com/ipython/ipython/issues/8133#issuecomment-93051239):

<rect x="10" y="10" width="100" height="100"
      clip-path="url(#myClip)"/>
<defs>
    <clipPath id="myClip">
        <circle cx="30" cy="30" r="20"/>
        <circle cx="70" cy="70" r="20"/>
    </clipPath>
</defs>

or basically anything emitted by matplotlib's svg backend.

This bug has been reported to ubuntu (https://bugs.launchpad.net/ubuntu/+source/librsvg/+bug/1207538) and matplotlib (https://github.com/matplotlib/matplotlib/issues/4341, https://github.com/matplotlib/matplotlib/issues/4179, https://github.com/matplotlib/matplotlib/issues/2277) but apparently never made it upstream.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
bugzilla
Assign labels
  • View project labels
Reference: GNOME/librsvg#109