2 import sys
; sys
.path
[:0] = ["../.."]
8 p
= ( path
.line(10*unit
.u_pt
, 10*unit
.u_pt
, 40*unit
.u_pt
, 40*unit
.u_pt
) +
9 path
.line(10*unit
.u_pt
, 40*unit
.u_pt
, 40*unit
.u_pt
, 10*unit
.u_pt
) )
12 t2
= trafo
.translate(5,0)
15 sc
= canvas
.canvas([t1
, t2
, t3
])
16 c
.insert(sc
).stroke(p
)
18 c
.stroke(c
.bbox().rect())
20 c
.stroke(p
.transformed(t1
*t2
*t3
), [color
.rgb
.green
, style
.linestyle
.dashed
])
22 c
.stroke(p
, [color
.rgb
.red
, style
.linestyle
.dotted
, t3
, t2
, t1
])
24 c
.writeEPSfile("test_canvas", paperformat
="a4")
26 d
= document
.document()
28 for nr
in range(1, 10):
29 page
= document
.page(pagename
= chr(64+nr
), rotated
=(nr
-1)%2, fittosize
=1)
30 page
.text(0, 0, "page %d" % nr
)
33 d
.writePSfile("test_document")