only import svg when needed
This commit is contained in:
parent
d86b0d1ca2
commit
1e57312b7b
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
import svg
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
# rounds to the next biggest even number
|
# rounds to the next biggest even number
|
||||||
|
@ -294,6 +293,7 @@ def sanity_check(layer):
|
||||||
|
|
||||||
# draw layer of articles
|
# draw layer of articles
|
||||||
def draw_layer(filename, layer):
|
def draw_layer(filename, layer):
|
||||||
|
import svg
|
||||||
scene = svg.Scene(filename, (pwidth, pheight))
|
scene = svg.Scene(filename, (pwidth, pheight))
|
||||||
for a in layer:
|
for a in layer:
|
||||||
scene.add(svg.Rectangle((a['x'], a['y']),(a['width'], a['height']),a['color']))
|
scene.add(svg.Rectangle((a['x'], a['y']),(a['width'], a['height']),a['color']))
|
||||||
|
|
Loading…
Reference in a new issue