Package pySVG :: Module pysvg :: Class SVG
[hide private]
[frames] | no frames]

Class SVG

source code

Base class for a SVG document

Instance Methods [hide private]
 
__init__(self, title="svg", description="", height=None, width=None, viewBox=None) source code
 
getXML(self)
Return a XML representation of the current SVG document.
source code
 
saveSVG(self, filename)
Saves the current SVG document into a file.
source code
 
addElement(self, element)
Generic method to add any element to the document
source code
Method Details [hide private]

getXML(self)

source code 

Return a XML representation of the current SVG document. This function can be used for debugging purposes.

Returns:
the representation of the current SVG as an xml string

saveSVG(self, filename)

source code 

Saves the current SVG document into a file.

Parameters:
  • filename (string) - file to store the svg in (complete path+filename+extension)

addElement(self, element)

source code 

Generic method to add any element to the document

Parameters:
  • element (Object that contains a getXML method (circle, line, text, polyline, etc....)) - the element to add to the doc