fixed a raw string
[PyX/mjg.git] / examples / path / at.py
blob9c961a8efa51379fe0bfe80959cd2f112c1c8aa2
1 from pyx import *
3 def mark(x, y):
4 return path.circle(x, y, 0.1)
6 c = canvas.canvas()
8 p1 = path.curve(0, 0, 1, 0, 1, 1, 2, 1)
9 c.stroke(p1)
10 c.fill(mark(*p1.atbegin()))
11 c.fill(mark(*p1.at(0.5*p1.arclen())))
12 c.fill(mark(*p1.atend()))
14 p2 = path.curve(3, 0, 4, 0, 4, 1, 5, 1)
15 c.stroke(p2)
16 c.fill(mark(*p2.at(p2.begin()+0.5)))
17 c.fill(mark(*p2.at(p2.end()-0.5)))
19 c.writeEPSfile("at")
20 c.writePDFfile("at")