# HG changeset patch # User wycc # Date 1234657297 -28800 # Node ID 1b69da2494e9b68b4ad22a819d59e0551ca9ebcc # Parent 5bf5032704197b3c2446b1248cf3fe3ccbccf8ff Use the opacity of the style to overwrite the default opacity property of the node itself. diff -r 5bf503270419 -r 1b69da2494e9 tools/svg2code.py --- a/tools/svg2code.py Wed Feb 04 09:12:02 2009 +0800 +++ b/tools/svg2code.py Sun Feb 15 08:21:37 2009 +0800 @@ -134,9 +134,16 @@ try: opacity = float(node.getAttribute('opacity')) except: - opacity = 0.5 + opacity = 1.0 pass + try: + opacity = float(prop_map['opacity']) + except: + pass + + print "# opacity of %s is %g" % (node_id, opacity) + if prop_map.has_key('fill'): fill = prop_map['fill'].strip() if fill.startswith('#') and len(fill) == 7: