parameters: (self, trans=None)
return_statement: return line
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."""
  
          line = self.Path(trans).SVG()
  
          if ((self.arrow_start != False and self.arrow_start is not None) or
              (self.arrow_end != False and self.arrow_end is not None)):
              defs = SVG("defs")
  
              if self.arrow_start != False and self.arrow_start is not None:
                  if isinstance(self.arrow_start, SVG):
                      defs.append(self.arrow_start)
                      line.attr["marker-start"] = "url(#%s)" % self.arrow_start["id"]
                  elif isinstance(self.arrow_start, basestring):
                      defs.append(make_marker(self.arrow_start, "arrow_start"))
                      line.attr["marker-start"] = "url(#%s)" % self.arrow_start
                  else:
                      raise TypeError("arrow_start must be False/None or an id string for the new marker")
  
              if self.arrow_end != False and self.arrow_end is not None:
                  if isinstance(self.arrow_end, SVG):
                      defs.append(self.arrow_end)
                      line.attr["marker-end"] = "url(#%s)" % self.arrow_end["id"]
                  elif isinstance(self.arrow_end, basestring):
                      defs.append(make_marker(self.arrow_end, "arrow_end"))
                      line.attr["marker-end"] = "url(#%s)" % self.arrow_end
                  else:
                      raise TypeError("arrow_end must be False/None or an id string for the new marker")
  
              return SVG("g", defs, line)
  
          return line
function_tokens: def SVG ( self , trans = None ) : line = self . Path ( trans ) . SVG ( ) if ( ( self . arrow_start != False and self . arrow_start is not None ) or ( self . arrow_end != False and self . arrow_end is not None ) ) : defs = SVG ( "defs" ) if self . arrow_start != False and self . arrow_start is not None : if isinstance ( self . arrow_start , SVG ) : defs . append ( self . arrow_start ) line . attr [ "marker-start" ] = "url(#%s)" % self . arrow_start [ "id" ] elif isinstance ( self . arrow_start , basestring ) : defs . append ( make_marker ( self . arrow_start , "arrow_start" ) ) line . attr [ "marker-start" ] = "url(#%s)" % self . arrow_start else : raise TypeError ( "arrow_start must be False/None or an id string for the new marker" ) if self . arrow_end != False and self . arrow_end is not None : if isinstance ( self . arrow_end , SVG ) : defs . append ( self . arrow_end ) line . attr [ "marker-end" ] = "url(#%s)" % self . arrow_end [ "id" ] elif isinstance ( self . arrow_end , basestring ) : defs . append ( make_marker ( self . arrow_end , "arrow_end" ) ) line . attr [ "marker-end" ] = "url(#%s)" % self . arrow_end else : raise TypeError ( "arrow_end must be False/None or an id string for the new marker" ) return SVG ( "g" , defs , line ) return line