From a70c64e06ebcea83b471b08e5c01136949b97c56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Wed, 1 Sep 2004 11:16:40 +0000 Subject: [PATCH] some cleanup: remove unneeded sorts (intersect results are always sorted in the first list); make use of _pt methods git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@1870 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/connector.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pyx/connector.py b/pyx/connector.py index aaa1e397..91c36579 100644 --- a/pyx/connector.py +++ b/pyx/connector.py @@ -44,13 +44,11 @@ class connector_pt(path.normpath): # cut off the start of self # XXX how can decoration of this box1.path() be handled? sp = self.intersect(box1.path())[0] - sp.sort() if sp: self.normsubpaths = self.split(sp[-1:])[1].normsubpaths # cut off the end of self sp = self.intersect(box2.path())[0] - sp.sort() if sp: self.normsubpaths = self.split(sp[:1])[0].normsubpaths @@ -59,7 +57,7 @@ class connector_pt(path.normpath): # XXX later, this should be done by extended boxes instead of intersecting with circles # cut off the start of self - center = (unit.topt(self.begin()[0]), unit.topt(self.begin()[1])) + center = self.begin_pt() try: cutpath = path.circle_pt(center[0], center[1], dists[0]) sp = self.intersect(cutpath)[0] @@ -67,11 +65,10 @@ class connector_pt(path.normpath): pass else: if sp: - sp.sort() self.normsubpaths = self.split(sp[-1:])[1].normsubpaths # cut off the end of self - center = (unit.topt(self.end()[0]), unit.topt(self.end()[1])) + center = self.end_pt() try: cutpath = path.circle_pt(center[0], center[1], dists[1]) sp = self.intersect(cutpath)[0] @@ -79,7 +76,6 @@ class connector_pt(path.normpath): pass else: if sp: - sp.sort() self.normsubpaths = self.split(sp[:1])[0].normsubpaths -- 2.11.4.GIT