11
11
ns = {'svg': 'http://www.w3.org/2000/svg',
12
12
'ink': 'http://www.inkscape.org/namespaces/inkscape'}
14
16
for svg in glob.glob('data/*.svg'):
15
17
t = etree.parse(svg)
16
18
basefile = os.path.basename(svg).split('.')[0]
61
sel = CSSSelector('svg|rect[ink|label="cat"]', ns)
63
x, y = float(e.get('x')), float(e.get('y'))
59
71
sel = CSSSelector('svg|rect[ink|label="fish"]', ns)
61
73
x, y = float(e.get('x')), float(e.get('y'))
83
sel = CSSSelector('svg|rect[ink|label="flag"]', ns)
85
x, y = float(e.get('x')), float(e.get('y'))
86
w, h = float(e.get('width')), float(e.get('height'))
91
width = %f, height = %f,
95
sel = CSSSelector('svg|rect[ink|label="fairy"]', 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="gatetrigger"]', 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="troll"]', ns)
121
x, y = float(e.get('x')), float(e.get('y'))
122
#w, h = float(e.get('width')), float(e.get('height'))
134
sel = CSSSelector('svg|rect[ink|label="gateup"]', ns)
136
x, y = float(e.get('x')), float(e.get('y'))
137
w, h = float(e.get('width')), float(e.get('height'))
142
width = %f, height = %f,
143
fill = {108,57,22,255},
148
sel = CSSSelector('svg|rect[ink|label="gatedown"]', ns)
150
x, y = float(e.get('x')), float(e.get('y'))
151
w, h = float(e.get('width')), float(e.get('height'))
156
width = %f, height = %f,
157
fill = {108,57,22,255},