parameters: (self, trans=None)
return_statement: return output
docstring: Apply the transformation "trans" and return an SVG object.
docstring_summary: Apply the transformation "trans" and return an SVG object.
docstring_tokens: Apply the transformation trans and return an SVG object .
function: def SVG(self, trans=None):
          """Apply the transformation "trans" and return an SVG object."""
          if isinstance(trans, basestring):
              trans = totrans(trans)
  
          output = SVG("g", SVG("defs", self.symbol))
          id = "#%s" % self.symbol["id"]
  
          for p in self.d:
              x, y = p[0], p[1]
  
              if trans is None:
                  X, Y = x, y
              else:
                  X, Y = trans(x, y)
  
              item = SVG("use", x=X, y=Y, xlink__href=id)
              if self.width is not None:
                  item["width"] = self.width
              if self.height is not None:
                  item["height"] = self.height
              output.append(item)
  
          return output
function_tokens: def SVG ( self , trans = None ) : if isinstance ( trans , basestring ) : trans = totrans ( trans ) output = SVG ( "g" , SVG ( "defs" , self . symbol ) ) id = "#%s" % self . symbol [ "id" ] for p in self . d : x , y = p [ 0 ] , p [ 1 ] if trans is None : X , Y = x , y else : X , Y = trans ( x , y ) item = SVG ( "use" , x = X , y = Y , xlink__href = id ) if self . width is not None : item [ "width" ] = self . width if self . height is not None : item [ "height" ] = self . height output . append ( item ) return output