document module
SVG document representation, provides file I/O and access to the DOM
-
class document.Document(gridSize=640)[source]
represents a single SVG document, a square of width and height gridSize
-
append(element)[source]
append element as lxml node to canvas
-
appendDefinition(definition)[source]
adds lxml node element to defs
-
makeGroup(id=None)[source]
returns a group element lxml node with given id
DEPRECATED, as no longer document-dependent, use element.buildGroup()
-
writeSVG(filename, pathAbsolute=False)[source]
writes SVG document to file
-
document.setAttributesFromDict(element, dict)[source]
uses a dictionary to populate xml attributes for a particular lxml element