/ld26

To get this branch, use:
bzr branch /bzr/ld26

« back to all changes in this revision

Viewing changes to svg_levels.py

  • Committer: Josh C
  • Date: 2013-04-29 00:08:20 UTC
  • Revision ID: josh@9ix.org-20130429000820-bth2m0z5q94drdxn
fairy

Show diffs side-by-side

added added

removed removed

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
 
95
107
    sel = CSSSelector('svg|rect[ink|label="gatetrigger"]', ns)
96
108
    for e in sel(t):
97
109
        x, y = float(e.get('x')), float(e.get('y'))