(self, nodeList, 
                             matCurrent = [[1.0, 0.0, 0.0], [0.0, -1.0, 0.0]],
                             parent_visibility = 'visible')
Recursively traverse the svg file to plot out all of the
    paths.  The function keeps track of the composite transformation
    that should be applied to each path.

    This function handles path, group, line, rect, polyline, polygon,
    circle, ellipse and use (clone) elements. Notable elements not
    handled include text.  Unhandled elements should be converted to
    paths in Inkscape.

    TODO: There's a lot of inlined code in the eggbot version of this
    that would benefit from the Entities method of dealing with things.
Recursively traverse the svg file to plot out all of the
    paths.  The function keeps track of the composite transformation
    that should be applied to each path.
Recursively traverse the svg file to plot out all of the paths . The function keeps track of the composite transformation that should be applied to each path .
def recursivelyTraverseSvg(self, nodeList, 
                             matCurrent = [[1.0, 0.0, 0.0], [0.0, -1.0, 0.0]],
                             parent_visibility = 'visible'):
    """
    Recursively traverse the svg file to plot out all of the
    paths.  The function keeps track of the composite transformation
    that should be applied to each path.

    This function handles path, group, line, rect, polyline, polygon,
    circle, ellipse and use (clone) elements. Notable elements not
    handled include text.  Unhandled elements should be converted to
    paths in Inkscape.

    TODO: There's a lot of inlined code in the eggbot version of this
    that would benefit from the Entities method of dealing with things.
    """
    for node in nodeList:
      # Ignore invisible nodes
      v = node.get('visibility', parent_visibility)
      if v == 'inherit':
        v = parent_visibility
      if v == 'hidden' or v == 'collapse':
        pass

      # first apply the current matrix transform to this node's transform
      matNew = composeTransform(matCurrent, parseTransform(node.get("transform")))

      if node.tag == inkex.addNS('g','svg') or node.tag == 'g':
        if (node.get(inkex.addNS('groupmode','inkscape')) == 'layer'):
          layer_name = node.get(inkex.addNS('label','inkscape'))
          if(self.pause_on_layer_change == 'true'):
            self.entities.append(SvgLayerChange(layer_name))
        self.recursivelyTraverseSvg(node, matNew, parent_visibility = v)
      elif node.tag == inkex.addNS('use','svg') or node.tag == 'use':
        refid = node.get(inkex.addNS('href','xlink'))
        if refid:
          # [1:] to ignore leading '#' in reference
          path = '//*[@id="%s"]' % refid[1:]
          refnode = node.xpath( path )
          if refnode:
            x = float(node.get('x','0'))
            y = float(node.get('y','0'))
            # Note: the transform has already been applied
            if (x!=0) or (y!=0):
              matNew2 = composeTransform(matNew,parseTransform('translate(%f,%f)' % (x,y)))
            else:
              matNew2 = matNew
            v = node.get('visibility',v)
            self.recursivelyTraverseSvg(refnode,matNew2,parent_visibility=v)
          else:
            pass
        else:
          pass
      elif not isinstance(node.tag, basestring):
        pass
      else:
        entity = self.make_entity(node, matNew)
        if entity == None:
          inkex.errormsg('Warning: unable to draw object, please convert it to a path first.')
def recursivelyTraverseSvg ( self , nodeList , matCurrent = [ [ 1.0 , 0.0 , 0.0 ] , [ 0.0 , - 1.0 , 0.0 ] ] , parent_visibility = 'visible' ) : for node in nodeList : # Ignore invisible nodes v = node . get ( 'visibility' , parent_visibility ) if v == 'inherit' : v = parent_visibility if v == 'hidden' or v == 'collapse' : pass # first apply the current matrix transform to this node's transform matNew = composeTransform ( matCurrent , parseTransform ( node . get ( "transform" ) ) ) if node . tag == inkex . addNS ( 'g' , 'svg' ) or node . tag == 'g' : if ( node . get ( inkex . addNS ( 'groupmode' , 'inkscape' ) ) == 'layer' ) : layer_name = node . get ( inkex . addNS ( 'label' , 'inkscape' ) ) if ( self . pause_on_layer_change == 'true' ) : self . entities . append ( SvgLayerChange ( layer_name ) ) self . recursivelyTraverseSvg ( node , matNew , parent_visibility = v ) elif node . tag == inkex . addNS ( 'use' , 'svg' ) or node . tag == 'use' : refid = node . get ( inkex . addNS ( 'href' , 'xlink' ) ) if refid : # [1:] to ignore leading '#' in reference path = '//*[@id="%s"]' % refid [ 1 : ] refnode = node . xpath ( path ) if refnode : x = float ( node . get ( 'x' , '0' ) ) y = float ( node . get ( 'y' , '0' ) ) # Note: the transform has already been applied if ( x != 0 ) or ( y != 0 ) : matNew2 = composeTransform ( matNew , parseTransform ( 'translate(%f,%f)' % ( x , y ) ) ) else : matNew2 = matNew v = node . get ( 'visibility' , v ) self . recursivelyTraverseSvg ( refnode , matNew2 , parent_visibility = v ) else : pass else : pass elif not isinstance ( node . tag , basestring ) : pass else : entity = self . make_entity ( node , matNew ) if entity == None : inkex . errormsg ( 'Warning: unable to draw object, please convert it to a path first.' )