add gallery, don't include .svn stuff from contrib
[PyX/mjg.git] / examples / path / addjoin.py
blob5aa15f5aa67fe74b4019fbce1c666963b9a46f5a
1 from pyx import *
3 unit.set(wscale=10)
5 c = canvas.canvas()
7 c.stroke(path.line(0, 0, 1, 0) +
8 path.line(1, 0, 1, 1) +
9 path.line(1, 1, 0, 1) +
10 path.line(0, 1, 0, 0))
12 c.stroke(path.line(2, 0, 3, 0) <<
13 path.line(3, 0, 3, 1) <<
14 path.line(3, 1, 2, 1) <<
15 path.line(2, 1, 2, 0))
17 p = path.line(4, 0, 5, 0) << path.line(5, 0, 5, 1) << path.line(5, 1, 4, 1)
18 p.append(path.closepath())
19 c.stroke(p)
21 c.writeEPSfile("addjoin")
22 c.writePDFfile("addjoin")