remove the pre-defined smooth instances
[PyX/mjg.git] / test / functional / test_pattern.py
blobb3e1936064c36f91ce34ca69d25e562050a648a4
1 #!/usr/bin/env python
2 import sys; sys.path[:0] = ["../.."]
4 from pyx import *
6 c = canvas.canvas()
8 pa1= pattern.pattern()
9 pa1.set([style.linewidth.thin])
10 pa1.stroke(path.line(0, 0, 0.25, 0.25))
11 pa1.stroke(path.line(0, 0.25, 0.25, 0))
13 #c.draw(path.circle(3, 3, 3), [deco.filled([pa1])])
14 c.draw(path.circle(3, 3, 3), [deco.filled([pa1]), deco.stroked])
15 c.draw(path.circle(5, 1, 1), [deco.filled([pa1]), deco.stroked])
17 pa2 = pattern.pattern()
18 pa2.text(0.125, 0.125, r"\PyX")
20 c.draw(path.rect(-1, -1, 1, 1), [deco.filled([pa2]), deco.stroked])
22 c.writeEPSfile("test_pattern", paperformat=document.paperformat.A4)
23 c.writePDFfile("test_pattern", paperformat=document.paperformat.A4)