Skip to content

Commit

Permalink
Fix Inkscape 1.0rc1 API compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoek committed Apr 18, 2020
1 parent b977def commit caa91af
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions isometric_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,6 @@ def getTransformCenter(self, midpoint, node):

return [x, y]

def getMidPoint(self, bbox, node):
"""
Get the coordinates of the center of the bounding box.
"""

x = bbox[1] - (bbox[1] - bbox[0]) / 2
y = bbox[3] - (bbox[3] - bbox[2]) / 2

return [x, y]

def translateBetweenPoints(self, tr, here, there):
"""
Add a translation to a matrix that moves between two points.
Expand Down Expand Up @@ -169,7 +159,7 @@ def effect(self):

for id, node in self.svg.selected.items():
bbox = node.bounding_box()
midpoint = self.getMidPoint(bbox, node)
midpoint = [bbox.center_x, bbox.center_y]
center_old = self.getTransformCenter(midpoint, node)
transform = node.get("transform")
# Combine our transformation matrix with any pre-existing
Expand Down

0 comments on commit caa91af

Please sign in to comment.