deco.arrow(): allow relative positioning of the arrow
commit042cbc42b79a133f1886224581cb76e536459f35
authorMichael J Gruber <michaeljgruber@users.sourceforge.net>
Sat, 14 May 2011 11:50:11 +0000 (14 13:50 +0200)
committerMichael J Gruber <michaeljgruber@users.sourceforge.net>
Sat, 14 May 2011 11:57:36 +0000 (14 13:57 +0200)
tree52790551a511762dc28e376248a3f1c7c92a2cc4
parent8879d0e0ad21aa3e49e1ec56585ecdd7207cba45
deco.arrow(): allow relative positioning of the arrow

Currently, the pos parameter gives the position of the head of tip of
the arrow. This is problematic when one wants to position the arrow in
the middle of a line or arc: pos=0.5 gives an arrow which is visually
off the middle (it is visually to the left of it).

Introduce a parameter poscorr which shifts the arrow by an amount which
is relative to the size of the arrowhead (and the constriction).

poscorr=0 is the default (tip at pos)
poscorr=1 puts the constriction center at pos
pyx/deco.py