/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 16:51:36 UTC
  • Revision ID: josh@9ix.org-20130428165136-f3eg4lscd1mdb9wo
level tweaks

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
},
57
57
""" % (x,y)
58
58
 
59
 
    sel = CSSSelector('svg|rect[ink|label="fish"]', ns)
60
 
    for e in sel(t):
61
 
        x, y = float(e.get('x')), float(e.get('y'))
62
 
        w, h = float(e.get('width')), float(e.get('height'))
63
 
 
64
 
        print """
65
 
Fish:new{
66
 
  x = %f, y = %f,
67
 
  width = %f, height = %f,
68
 
},
69
 
""" % (x,y,w,h)
70
 
 
71
 
    sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
72
 
    for e in sel(t):
73
 
        x, y = float(e.get('x')), float(e.get('y'))
74
 
        #w, h = float(e.get('width')), float(e.get('height'))
75
 
 
76
 
        print """
77
 
Troll:new{
78
 
  x = %f, y = %f,
79
 
},
80
 
""" % (x,y)
81
 
 
82
 
 
83
59
    print '},'
84
60
 
85
61
print '}'