add UnicodeEngine (MultiEngineText and axis texters returning MultiEngineText), texte...
[PyX.git] / test / functional / test_layer.py
blob0a9d6931c3812cce709ab85a05ece9ae7773c93f
1 import sys; sys.path.insert(0, "../..")
2 from pyx import *
4 c = canvas.canvas()
6 l1b = c.layer("1.b")
7 c.stroke(path.line(0, 0, 1, 0))
8 l2 = c.layer("2")
9 l1a = c.layer("1.a", below="1.b")
11 l1b.text(0.22, 0, "1b", [color.rgb.red, text.halign.center, text.vshift.mathaxis])
12 l2.text(0.5, 0, "2", [color.rgb.green, text.halign.center, text.vshift.mathaxis])
13 l1a.text(0.75, 0, "1a", [color.rgb.blue, text.halign.center, text.vshift.mathaxis])
14 l1a.stroke(path.line(0.25, -0.25, 0.25, 0.25), [color.rgb.blue])
16 c.writeEPSfile("test_layer", page_paperformat=document.paperformat.A4, page_fittosize=1)
17 c.writePDFfile("test_layer", page_paperformat=document.paperformat.A4, page_fittosize=1)
18 c.writeSVGfile("test_layer", page_paperformat=document.paperformat.A4, page_fittosize=1)