index e8eff2c01f892b8c5ce19e21b5a536aae0089cbb..40beee95cfab46064b7ef19cfaa16b26c8123282 100755 (executable)
#!/usr/bin/env python
'''
-Copyright (C) 2005 Aaron Spike, aaron@ekips.org
+Copyright (C) 2005,2007 Aaron Spike, aaron@ekips.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
self.dxf_add("999\nDXF created by Inkscape\n0\nSECTION\n2\nENTITIES")\r
\r
scale = 25.4/90.0
- h = inkex.unittouu(inkex.xml.xpath.Evaluate('/svg/@height',self.document)[0].value)\r
-
- path = '//path'
- for node in inkex.xml.xpath.Evaluate(path,self.document):\r
- d = node.attributes.getNamedItem('d').value\r
+ h = inkex.unittouu(self.document.getroot().xpath('@height',inkex.NSS)[0])\r
+
+ path = '//svg:path'
+ for node in self.document.getroot().xpath(path,inkex.NSS):\r
+ d = node.get('d')\r
sim = simplepath.parsePath(d)\r
simplepath.scalePath(sim,scale,-scale)\r
simplepath.translatePath(sim,0,h*scale)