The approach was quite correct, it seems that shrinkA
and shrinkB
should be given in a ratio value between 0.
and 1.
:
orig = (1.1,2.)
target = (1.1,7.)
shrinkA = 0.1 # given in points
shrinkB = 0.1
b = patches.ConnectionStyle('Arc')
path = b.connect( orig, target )
path = b._shrink( path, shrinkA, shrinkB )
To get the new values for orig
and target
:
neworig, newtarget = path.vertices