2 import sys
; sys
.path
[:0] = ["../.."]
8 pattern
= canvas
.pattern()
9 pattern
.set([style
.linewidth
.thin
])
10 pattern
.stroke(path
.line(0, 0, 0.25, 0.25))
11 pattern
.stroke(path
.line(0, 0.25, 0.25, 0))
13 c
.draw(path
.circle(3, 3, 3), [deco
.filled([pattern
]), deco
.stroked
])
15 pyxpattern
= canvas
.pattern()
16 pyxpattern
.text(0.125, 0.125, r
"\PyX")
18 c
.draw(path
.rect(-1, -1, 1, 1), [deco
.filled([pyxpattern
]), deco
.stroked
])
20 c
.writeEPSfile("test_pattern", paperformat
="a4" )