fix defaults for x any y (to be strings)
[PyX.git] / examples / text / textalongpath.py
blobf2180381c2102a9d1f91bda72e4b8183874cbdc7
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")
13 c.writeSVGfile("textalongpath")