From 7e96523b64daa2a46ca59e4ba6f97c7779b3da5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Fri, 20 May 2011 11:54:38 +0000 Subject: [PATCH] arrow decorator: proper sign of constriction length for positioning reversed arrows git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3151 069f4177-920e-0410-937b-c2a4a81bcd90 --- CHANGES | 3 +++ pyx/deco.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 64289a97..ad5ac501 100644 --- a/CHANGES +++ b/CHANGES @@ -104,6 +104,9 @@ TODO: - fixes due to the dvi and font restructuring - setup.py: - fix build process for extension modules + - deco module: + - arrow decorator: proper sign of constriction length for positioning + reversed arrows 0.11 (2011/05/15): diff --git a/pyx/deco.py b/pyx/deco.py index f431ef2b..d068f6db 100644 --- a/pyx/deco.py +++ b/pyx/deco.py @@ -472,7 +472,7 @@ class arrow(deco, attr.attr): constrictionlen = self.size * 1 * math.cos(math.radians(self.angle/2.0)) arrowheadconstrictionlen = None - arclenfrombegin = constrictionlen + self.pos * (anormpath.arclen() - constrictionlen) + arclenfrombegin = (1-self.reversed)*constrictionlen + self.pos * (anormpath.arclen() - constrictionlen) direction = self.reversed and -1 or 1 arrowhead = _arrowhead(anormpath, arclenfrombegin, direction, self.size, self.angle, arrowheadconstrictionlen) -- 2.11.4.GIT