ged2doc.ancestor_tree_emf

Module containing methods/classes for laying out ancestor trees.

Classes

EMFTreeVisitor(width, height[, dpi])

AncestorTreeVisitor implementation which makes EMF image.

class ged2doc.ancestor_tree_emf.EMFTreeVisitor(width, height, dpi=300)[source]

Bases: ged2doc.ancestor_tree.AncestorTreeVisitor

AncestorTreeVisitor implementation which makes EMF image.

Parameters
width, heightged2doc.size.Size

Width and height of the image.

dpifloat

Image resolution.

Methods

makeEMF()

Produce EMF image 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.

makeEMF()[source]

Produce EMF image from a visited tree.

Returns
documentbytes

Concents of generated EMF image.

mime_typestr

MIME type of produced document.

widthged2doc.size.Size

Width of SVG document

heightged2doc.size.Size

Height of SVG document

_abc_impl = <_abc_data object>