/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 22:13:30 UTC
  • Revision ID: josh@9ix.org-20130428221330-duv67kmceabcitda
troll

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
},
69
69
""" % (x,y,w,h)
70
70
 
71
 
    sel = CSSSelector('svg|rect[ink|label="flag"]', 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
 
Flag:new{
78
 
  x = %f, y = %f,
79
 
  width = %f, height = %f,
80
 
},
81
 
""" % (x,y,w,h)
82
 
 
83
71
    sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
84
72
    for e in sel(t):
85
73
        x, y = float(e.get('x')), float(e.get('y'))