use the same coordinate space for the origin point, even though this is irrelevant...
[PyX.git] / examples / path / at.py
blobbb85e087a4608b616d55abd638b264ec01c5c823
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")
21 c.writeSVGfile("at")