ged2doc.ancestor_tree_svg¶
Module containing methods/classes for laying out ancestor trees.
Classes
|
|
-
class
ged2doc.ancestor_tree_svg.SVGTreeVisitor(units='in', fullxml=True)[source]¶ Bases:
ged2doc.ancestor_tree.AncestorTreeVisitorAncestorTreeVisitorimplementation which makes SVG plots.- Parameters
- units
str Type of dimension units for output SVG document.
- fullxml
bool, optional If
Truethen generate full XML header.
- units
Methods
makeSVG(width, height)Produce SVG document from a visited tree.
visitFatherEdge(node, parentNode)Visitor method for an edge leading from node to its mother.
visitMotherEdge(node, parentNode)Visitor method for an edge leading from node to its mother.
visitNode(node)Visitor method for a node in tree.
-
visitMotherEdge(node, parentNode)[source]¶ Visitor method for an edge leading from node to its mother.
It is guaranteed that
visitNodeis called for both nodes before this method is called.- Parameters
- node
TreeNode Tree node.
- parentNode
TreeNode Parent tree node.
- node
-
visitFatherEdge(node, parentNode)[source]¶ Visitor method for an edge leading from node to its mother.
It is guaranteed that
visitNodeis called for both nodes before this method is called.- Parameters
- node
TreeNode Tree node.
- parentNode
TreeNode Parent tree node.
- node
-
makeSVG(width, height)[source]¶ Produce SVG document from a visited tree.
- Parameters
- width
ged2doc.size.Size Width of SVG document
- height
ged2doc.size.Size Height of SVG document
- width
- Returns
- document
str Concents of generated SVG document.
- mime_type
str MIME type of produced document.
- width
ged2doc.size.Size Width of SVG document
- height
ged2doc.size.Size Height of SVG document
- document
-
_textbox_svg(textbox, textclass=None, units='in', rect_style=None)[source]¶ Produces list of SVG elements for a textbox.
-
_abc_impl= <_abc_data object>¶