remove unnecessary list conversions
[PyX.git] / examples / drawing2 / ellipse.py
blobd450a3655a4a3fce21cf6e2f66551c3e6760836c
1 from pyx import *
3 c = canvas.canvas()
4 circ = path.circle(0, 0, 1)
6 # variant 1: use trafo as a deformer
7 c.stroke(circ, [style.linewidth.THIck,
8 trafo.scale(sx=2, sy=0.9), trafo.rotate(45), trafo.translate(1, 0)])
10 # variant 2: transform a subcanvas
11 sc = canvas.canvas()
12 sc.stroke(circ, [style.linewidth.THIck])
13 c.insert(sc, [trafo.scale(sx=2, sy=0.9), trafo.rotate(45), trafo.translate(5, 0)])
15 c.writeEPSfile("ellipse")
16 c.writePDFfile("ellipse")
17 c.writeSVGfile("ellipse")