~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to share/extensions/handles.py

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Kees Cook, Ted Gould
  • Date: 2008-02-10 14:20:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080210142016-vcnb2zqyhszu0xvb
Tags: 0.46~pre1-0ubuntu1
[ Kees Cook ]
* debian/control:
  - add libgtkspell-dev build-dep to gain GtkSpell features (LP: #183547).
  - update Standards version (no changes needed).
  - add Vcs and Homepage fields.
  - switch to new python-lxml dep.
* debian/{control,rules}: switch from dpatch to quilt for more sanity.
* debian/patches/20_fix_glib_and_gxx43_ftbfs.patch:
  - merged against upstream fixes.
  - added additional fixes for newly written code.
* debian/rules: enable parallel building.

[ Ted Gould ]
* Updating POTFILES.in to make it so things build correctly.
* debian/control:
  - add ImageMagick++ and libboost-dev to build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
class Handles(inkex.Effect):
22
22
    def effect(self):
23
23
        for id, node in self.selected.iteritems():
24
 
            if node.tagName == 'path':
25
 
                p = simplepath.parsePath(node.attributes.getNamedItem('d').value)
 
24
            if node.tag == inkex.addNS('path','svg'):
 
25
                p = simplepath.parsePath(node.get('d'))
26
26
                a =[]
27
27
                pen = None
28
28
                subPathStart = None
43
43
                        pen = params[-2:]
44
44
                    
45
45
                if len(a) > 0:
46
 
                    new = self.document.createElement('svg:path')
47
46
                    s = {'stroke-linejoin': 'miter', 'stroke-width': '1.0px', 
48
47
                        'stroke-opacity': '1.0', 'fill-opacity': '1.0', 
49
48
                        'stroke': '#000000', 'stroke-linecap': 'butt', 
50
49
                        'fill': 'none'}
51
 
                    new.setAttribute('style', simplestyle.formatStyle(s))
52
 
                    new.setAttribute('d', simplepath.formatPath(a))
53
 
                    node.parentNode.appendChild(new)
54
 
 
 
50
                    attribs = {'style':simplestyle.formatStyle(s),'d':simplepath.formatPath(a)}
 
51
                    inkex.etree.SubElement(node.getparent(), inkex.addNS('path','svg'), attribs)
 
52
                    
55
53
e = Handles()
56
54
e.affect()