prevent double call of _cleanup, which harms usefiles (and is a bad idea in general)
[PyX.git] / examples / path / addjoin.py
blob6f10e7e80a7c730300e55ed4397f5951803842f8
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")
23 c.writeSVGfile("addjoin")