Skip to content

Commit

Permalink
Avoid a deprecation warning from Inkscape 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
spakin committed Nov 16, 2024
1 parent 22dde58 commit 7541991
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions simpinkscr/svg_to_simp_ink_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,9 +1003,13 @@ def convert_guide(self, node):
# Inkscape 1.3+
pos = node.position
except AttributeError:
# Inkscape 1.2 and earlier
# Inkscape 1.2
pt = node.point
pos = (pt.x, self.svg.height - pt.y)
try:
pos = (pt.x, self.svg.viewbox_height - pt.y)
except AttributeError:
# Inkscape 1.0 and 1.1
pos = (pt.x, self.svg.height - pt.y)

# Compute the angle at which the guide is oriented.
try:
Expand Down

0 comments on commit 7541991

Please sign in to comment.