prevent double call of _cleanup, which harms usefiles (and is a bad idea in general)
[PyX.git] / test / functional / test_unit.py
blob99665aa731f68b3694946b1af76dffa80ef59c0b
1 #!/usr/bin/env python
2 import sys; sys.path[:0] = ["../.."]
4 from pyx import *
5 from pyx.path import *
7 c=canvas.canvas()
9 unit.set(uscale=1)
10 c.stroke(path(moveto(0,0), lineto(unit.u_cm+unit.t_cm, unit.u_cm)), [color.rgb.red])
11 unit.set(uscale=2)
12 c.stroke(path(moveto(0,0), lineto(unit.u_cm+unit.t_cm, unit.u_cm)), [color.rgb.green])
13 unit.set(uscale=4)
14 c.stroke(path(moveto(0,0), lineto(unit.u_cm+unit.t_cm, unit.u_cm)), [color.rgb.blue])
16 c.writeEPSfile("test_unit")
17 c.writePDFfile("test_unit")
18 c.writeSVGfile("test_unit")