122 |
if not self.pq: self.initpaper() |
if not self.pq: self.initpaper() |
123 |
putnoc(vs, background(self.bgcolor)) |
putnoc(vs, background(self.bgcolor)) |
124 |
|
|
125 |
w = size.width |
cs1 = vs.coords.affineCoordsys(0, 10, 0, 0, |
126 |
h = size.height |
size.width, 0, |
127 |
|
0, size.height) |
|
cs1 = vs.coords.affineCoordsys(0, 10, 0, 0, w, 0, 0, h) |
|
128 |
scale = float(zoom) |
scale = float(zoom) |
129 |
cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, scale / w, 0, 0, scale / h) |
cs2 = vs.coords.affineCoordsys(0, 0, 0, 0, |
130 |
|
scale / size.width, 0, |
131 |
|
0, scale / size.height) |
132 |
|
|
133 |
cs1left = vs.coords.ortho(cs1, 0, 0, 0, .5, 1) |
cs1left = vs.coords.ortho(cs1, 0, 0, 0, .5, 1) |
134 |
cs1right = vs.coords.ortho(cs1, 0, .5, 0, .5, 1) |
cs1right = vs.coords.ortho(cs1, 0, .5, 0, .5, 1) |
135 |
|
|
136 |
cs2left = vs.coords.ortho(0, 0, 0, 0, scale / w * 2, scale / h) |
cs2left = vs.coords.ortho(0, 0, 0, 0, |
137 |
cs2right = vs.coords.ortho(0, 0, -1, 0, scale / w * 2, scale / h) |
scale / size.width * 2, |
138 |
|
scale / size.height) |
139 |
print scale, w, h |
cs2right = vs.coords.ortho(0, 0, -1, 0, |
140 |
|
scale / size.width * 2, |
141 |
|
scale / size.height) |
142 |
|
|
143 |
vs.matcher.add(cs1, "1") |
vs.matcher.add(cs1, "1") |
144 |
vs.matcher.add(cs2, "2") |
vs.matcher.add(cs2, "2") |
166 |
else: |
else: |
167 |
print "ARGH ",self.optimized |
print "ARGH ",self.optimized |
168 |
|
|
169 |
cs3 = vs.coords.affineCoordsys(0, 0, 0, 0, h/2, 0, 0, h/2) |
cs3 = vs.coords.affineCoordsys(0, 0, 0, 0, |
170 |
|
size.height/2, 0, |
171 |
|
0, size.height/2) |
172 |
vs.matcher.add(cs3, "txt") |
vs.matcher.add(cs3, "txt") |
173 |
|
|
174 |
putText(vs, cs3, str(self.seed), color=(0,0,0), x=0, y=.12, h=.2) |
putText(vs, cs3, str(self.seed), color=(0,0,0), x=0, y=.12, h=.2) |