ged2doc.ancestor_tree_svg

Module containing methods/classes for laying out ancestor trees.

Classes

SVGTreeVisitor([units, fullxml])

AncestorTreeVisitor implementation which makes SVG plots.

class ged2doc.ancestor_tree_svg.SVGTreeVisitor(units='in', fullxml=True)[source]

Bases: ged2doc.ancestor_tree.AncestorTreeVisitor

AncestorTreeVisitor implementation which makes SVG plots.

Parameters
unitsstr

Type of dimension units for output SVG document.

fullxmlbool, optional

If True then generate full XML header.

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.

visitNode(node)[source]

Visitor method for a node in tree.

Parameters
nodeTreeNode

Tree node.

visitMotherEdge(node, parentNode)[source]

Visitor method for an edge leading from node to its mother.

It is guaranteed that visitNode is called for both nodes before this method is called.

Parameters
nodeTreeNode

Tree node.

parentNodeTreeNode

Parent tree node.

visitFatherEdge(node, parentNode)[source]

Visitor method for an edge leading from node to its mother.

It is guaranteed that visitNode is called for both nodes before this method is called.

Parameters
nodeTreeNode

Tree node.

parentNodeTreeNode

Parent tree node.

makeSVG(width, height)[source]

Produce SVG document from a visited tree.

Parameters
widthged2doc.size.Size

Width of SVG document

heightged2doc.size.Size

Height of SVG document

Returns
documentstr

Concents of generated SVG document.

mime_typestr

MIME type of produced document.

widthged2doc.size.Size

Width of SVG document

heightged2doc.size.Size

Height of SVG 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>