Skip to content

Commit 44a8c89

Browse files
committed
beziereditor: additional imports
1 parent 6f7cad4 commit 44a8c89

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

beziereditor/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,7 @@ def insert_point(self, x, y):
254254
255255
"""
256256

257-
try:
258-
bezier = _ctx.ximport("bezier")
259-
except:
260-
from nodebox.graphics import bezier
257+
from plotdevice.lib import pathmatics
261258

262259
# Do a number of checks distributed along the path.
263260
# Keep the one closest to the actual mouse location.
@@ -303,8 +300,8 @@ def insert_point(self, x, y):
303300
closest = closest_precise
304301

305302
# Update the points list with the inserted point.
306-
p = bezier.insert_point(self.path, closest_precise)
307-
i, t, pt = bezier._locate(self.path, closest_precise)
303+
p = pathmatics.insert_point(self.path, closest_precise)
304+
i, t, pt = pathmatics._locate(self.path, closest_precise)
308305
i += 1
309306
pt = PathElement()
310307
pt.cmd = p[i].cmd

beziereditor/svg/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import xml.dom.minidom as parser
88
import re
9-
from nodebox.grobs import RGB, MOVETO
9+
from plotdevice.grobs import RGB, MOVETO
1010

1111
def parse(svg):
1212

@@ -295,7 +295,7 @@ def add_transform_matrix(e, path):
295295
matrix = matrix.split(",")
296296
matrix = [float(v) for v in matrix]
297297

298-
from nodebox.graphics import Transform
298+
from plotdevice.grobs import Transform
299299
t = Transform()
300300
t._set_matrix(matrix)
301301
path = t.transformBezierPath(path)

0 commit comments

Comments
 (0)