Skip to content

Commit

Permalink
Don’t draw clipPath when defined after reference
Browse files Browse the repository at this point in the history
Fix #395.
  • Loading branch information
liZe committed Aug 4, 2023
1 parent c0a3875 commit 0d02afd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cairosvg/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def draw(self, node):
self.stroke_and_fill = False
self.draw(path)
self.stroke_and_fill = True
path.tag = 'clipPath'
self.context.restore()
# TODO: fill rules are not handled by cairo for clips
# if node.get('clip-rule') == 'evenodd':
Expand Down

0 comments on commit 0d02afd

Please sign in to comment.