/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26

« back to all changes in this revision

Viewing changes to svg_levels.py

  • Committer: Josh C
  • Date: 2013-04-28 23:19:25 UTC
  • Revision ID: josh@9ix.org-20130428231925-m2rgt3n1dg9gryz2
cat

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
},
93
93
""" % (x,y,w,h)
94
94
 
95
 
    sel = CSSSelector('svg|rect[ink|label="fairy"]', ns)
96
 
    for e in sel(t):
97
 
        x, y = float(e.get('x')), float(e.get('y'))
98
 
        w, h = float(e.get('width')), float(e.get('height'))
99
 
 
100
 
        print """
101
 
Fairy:new{
102
 
  x = %f, y = %f,
103
 
  width = %f, height = %f,
104
 
},
105
 
""" % (x,y,w,h)
106
 
 
107
95
    sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
108
96
    for e in sel(t):
109
97
        x, y = float(e.get('x')), float(e.get('y'))