deco.arrow: introduce relarclenpos and friendsarrow-arclenpos
commitbda204d485ee79071c9f64db2ebbba6d01b351d5
authorMichael J Gruber <michaeljgruber@users.sourceforge.net>
Wed, 30 May 2012 08:59:18 +0000 (30 10:59 +0200)
committerMichael J Gruber <michaeljgruber@users.sourceforge.net>
Wed, 30 May 2012 08:59:18 +0000 (30 10:59 +0200)
treeb30f22b8ff4cd5a7a3de76c2352799c8492f7ad2
parentbeae6225191b9d785ba7aceef31a8f7f18dcff33
deco.arrow: introduce relarclenpos and friends

The pos argument of deco.arrow() maps the range [0,1] to the range of
available positions such that the arrow head can be constructed from the
path without extrapolation. This is useful especially for begin and end
heads, but different from the positioning of other decorators such as
deco.text().

Introduce additional position parameters relarclenpos, arclenfrombegin
and arclendfromend which work exactly like for other decorators. They
all default to None, which means that the pos argument is used and the
behaviour of deco.arrow() is unchanged unless you specify a value for
one of the new arguments.

Also, introduce a new center argument which specifies the center of the
arrow head (multiples of its size). It defaults to the center of mass of
a solid triangular arrow head but is used only when any of the new
position parameters is specified.
pyx/deco.py