From: Michael J G. <mic...@us...> - 2012-05-10 08:28:24
|
r3151 took into account the direction already but missed the fact that arrows are positioned wrt. the constriction center now. Make it so that a reversed arrow is positioned wrt. the constriction center also. Signed-off-by: Michael J Gruber <mic...@us...> --- pyx/deco.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyx/deco.py b/pyx/deco.py index 8cc6f95..2231899 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 = (1-self.reversed)*constrictionlen + self.pos * (anormpath.arclen() - constrictionlen) + arclenfrombegin = (1-2*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) -- 1.7.10.1.702.g60a8c8a |