From 3ec20dbbba1e7e4b7f873ff87cfd2ef95b1ddc58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Lehmann?= Date: Sat, 10 Apr 2004 13:17:01 +0000 Subject: [PATCH] do no longer interpret unqualified user input as visual length git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@1661 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/bbox.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pyx/bbox.py b/pyx/bbox.py index 71127373..53ea3c0f 100644 --- a/pyx/bbox.py +++ b/pyx/bbox.py @@ -123,15 +123,15 @@ class bbox_pt: all is used, if bottom, left, top and/or right are not given. """ - bottom_pt = left_pt = top_pt = right_pt = unit.topt(unit.length(all, default_type="v")) + bottom_pt = left_pt = top_pt = right_pt = unit.topt(all) if bottom is not None: - bottom_pt = unit.topt(unit.length(bottom, default_type="v")) + bottom_pt = unit.topt(bottom) if left is not None: - left_pt = unit.topt(unit.length(left, default_type="v")) + left_pt = unit.topt(left) if top is not None: - top_pt = unit.topt(unit.length(top, default_type="v")) + top_pt = unit.topt(top) if right is not None: - right_pt = unit.topt(unit.length(right, default_type="v")) + right_pt = unit.topt(right) self.llx_pt -= left_pt self.lly_pt -= bottom_pt self.urx_pt += right_pt @@ -143,15 +143,15 @@ class bbox_pt: all is used, if bottom, left, top and/or right are not given. """ - bottom_pt = left_pt = top_pt = right_pt = unit.topt(unit.length(all, default_type="v")) + bottom_pt = left_pt = top_pt = right_pt = unit.topt(all) if bottom is not None: - bottom_pt = unit.topt(unit.length(bottom, default_type="v")) + bottom_pt = unit.topt(bottom) if left is not None: - left_pt = unit.topt(unit.length(left, default_type="v")) + left_pt = unit.topt(left) if top is not None: - top_pt = unit.topt(unit.length(top, default_type="v")) + top_pt = unit.topt(top) if right is not None: - right_pt = unit.topt(unit.length(right, default_type="v")) + right_pt = unit.topt(right) return bbox_pt(self.llx_pt-left_pt, self.lly_pt-bottom_pt, self.urx_pt+right_pt, self.ury_pt+top_pt) def rect(self): -- 2.11.4.GIT