fix bug 3524174, thanks to Jeff Higgins for the report, thanks to Michael J Gruber...
[PyX.git] / examples / text / textalongpath.py
blob67b343608ad7272b11b413892fd829bea8def117
1 from pyx import *
3 c = canvas.canvas()
5 p = path.path(path.moveto(-2, 0), path.curveto(-1, 0, -1, 1, 0, 1), path.curveto(1, 1, 1, 0, 2, 0))
7 c.stroke(p, [deco.curvedtext("\PyX{} is fun!"),
8 deco.curvedtext("left", textattrs=[text.halign.left, text.vshift.mathaxis], arclenfrombegin=0.5, exclude=0.1),
9 deco.curvedtext("right", textattrs=[text.halign.right, text.vshift.mathaxis], arclenfromend=0.5, exclude=0.1)])
11 c.writeEPSfile("textalongpath")
12 c.writePDFfile("textalongpath")