11
11
ns = {'svg': 'http://www.w3.org/2000/svg',
12
12
'ink': 'http://www.inkscape.org/namespaces/inkscape'}
16
14
for svg in glob.glob('data/*.svg'):
17
15
t = etree.parse(svg)
18
16
basefile = os.path.basename(svg).split('.')[0]
33
sel = CSSSelector('svg|rect[ink|label="maybedisplace"]', ns)
35
x, y = float(e.get('x')), float(e.get('y'))
36
w, h = float(e.get('width')), float(e.get('height'))
41
width = %f, height = %f
45
31
sel = CSSSelector('svg|rect[ink|label="transition"]', ns)
47
33
x, y = float(e.get('x')), float(e.get('y'))
73
sel = CSSSelector('svg|rect[ink|label="cat"]', ns)
75
x, y = float(e.get('x')), float(e.get('y'))
83
59
sel = CSSSelector('svg|rect[ink|label="fish"]', ns)
85
61
x, y = float(e.get('x')), float(e.get('y'))
95
sel = CSSSelector('svg|rect[ink|label="flag"]', ns)
97
x, y = float(e.get('x')), float(e.get('y'))
98
w, h = float(e.get('width')), float(e.get('height'))
103
width = %f, height = %f,
107
sel = CSSSelector('svg|rect[ink|label="fairy"]', ns)
109
x, y = float(e.get('x')), float(e.get('y'))
110
w, h = float(e.get('width')), float(e.get('height'))
115
width = %f, height = %f,
119
sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
121
x, y = float(e.get('x')), float(e.get('y'))
122
w, h = float(e.get('width')), float(e.get('height'))
127
width = %f, height = %f,
131
sel = CSSSelector('svg|rect[ink|label="fairyactivator"]', ns)
133
x, y = float(e.get('x')), float(e.get('y'))
134
w, h = float(e.get('width')), float(e.get('height'))
139
width = %f, height = %f,
143
sel = CSSSelector('svg|rect[ink|label="boat"]', ns)
145
x, y = float(e.get('x')), float(e.get('y'))
146
#w, h = float(e.get('width')), float(e.get('height'))
154
71
sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
156
73
x, y = float(e.get('x')), float(e.get('y'))
169
sel = CSSSelector('svg|rect[ink|label="gateup"]', ns)
171
x, y = float(e.get('x')), float(e.get('y'))
172
w, h = float(e.get('width')), float(e.get('height'))
177
width = %f, height = %f,
178
fill = {108,57,22,255},
183
sel = CSSSelector('svg|rect[ink|label="gatedown"]', ns)
185
x, y = float(e.get('x')), float(e.get('y'))
186
w, h = float(e.get('width')), float(e.get('height'))
191
width = %f, height = %f,
192
fill = {108,57,22,255},
197
sel = CSSSelector('svg|rect[ink|label="fairytarget"]', ns)
199
x, y = float(e.get('x')), float(e.get('y'))
200
w, h = float(e.get('width')), float(e.get('height'))
203
fairytarget = Sprite:new{
205
width = %f, height = %f,