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", page_paperformat
=document
.paperformat
.A4
)
25 c
.writePDFfile("test_canvas", page_paperformat
=document
.paperformat
.A4
)
26 c
.writeSVGfile("test_canvas", page_paperformat
=document
.paperformat
.A4
)