From 202a58068cae7c675b4e36e9bac44e1e6a7214df Mon Sep 17 00:00:00 2001 From: Aaron Spike Date: Sun, 24 Jun 2007 13:17:46 +0000 Subject: more pyxml to lxml conversion. I'd like to get someone else to look at Barcode and the TeX extension. Some of the big name extensions like pathalongpath.py still don't work but I have started converting (and somehow broke them). committing in case someone wants to help fix. :-) (bzr r3092) --- share/extensions/rtree.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'share/extensions/rtree.py') diff --git a/share/extensions/rtree.py b/share/extensions/rtree.py index 5d8ac9f3d..a70356557 100755 --- a/share/extensions/rtree.py +++ b/share/extensions/rtree.py @@ -44,19 +44,18 @@ class RTreeTurtle(inkex.Effect): dest="minimum", default=4.0, help="minimum branch size") def effect(self): - new = self.document.createElement('svg:path') s = {'stroke-linejoin': 'miter', 'stroke-width': '1.0px', 'stroke-opacity': '1.0', 'fill-opacity': '1.0', 'stroke': '#000000', 'stroke-linecap': 'butt', 'fill': 'none'} - new.setAttribute('style', simplestyle.formatStyle(s)) t = pturtle.pTurtle() t.pu() t.setpos(self.view_center) t.pd() rtree(t, self.options.size, self.options.minimum) - new.setAttribute('d', t.getPath()) - self.current_layer.appendChild(new) + + attribs = {'d':t.getPath(),'style':simplestyle.formatStyle(s)} + inkex.etree.SubElement(self.current_layer, inkex.addNS('path','svg'), attribs) e = RTreeTurtle() e.affect() -- cgit v1.2.3