5 #include "../Tree/TreeTemplateTools.h"
23 if (
getINode()->hasDistanceToFather())
43 unsigned int tipCounter = 0;
59 unique_ptr<Cursor> cursor;
60 unique_ptr<DrawINodeEvent> nodeEvent;
61 unique_ptr<DrawIBranchEvent> branchEvent;
67 cursor.reset(
new Cursor(x2, y, 0, hpos));
68 nodeEvent.reset(
new DrawINodeEvent(
this, &gDevice, &node, *cursor));
71 else if (node.
getInfos().isCollapsed())
75 cursor.reset(
new Cursor(x2, y, 0, hpos));
76 nodeEvent.reset(
new DrawINodeEvent(
this, &gDevice, &node, *cursor));
82 double miny = 1000000;
93 y = (maxy + miny) / 2.;
94 cursor.reset(
new Cursor(x2, y, 0, hpos));
95 nodeEvent.reset(
new DrawINodeEvent(
this, &gDevice, &node, *cursor));
97 gDevice.
drawLine(x2, miny, x2, maxy);
102 nodeEvent.reset(
new DrawINodeEvent(
this, &gDevice, &node, *cursor));
short getVerticalOrientation() const
static short ORIENTATION_TOP_TO_BOTTOM
short getHorizontalOrientation() const
static short ORIENTATION_LEFT_TO_RIGHT
void fireBeforeBranchEvent_(const DrawIBranchEvent &event) const
TreeTemplate< INode > * getTree_()
void fireAfterTreeEvent_(const DrawTreeEvent &event) const
void fireBeforeNodeEvent_(const DrawINodeEvent &event) const
void setTree(const Tree *tree)
void fireAfterNodeEvent_(const DrawINodeEvent &event) const
void fireBeforeTreeEvent_(const DrawTreeEvent &event) const
void fireAfterBranchEvent_(const DrawIBranchEvent &event) const
CladogramDrawBranchEvent(const TreeDrawing *source, GraphicDevice *gd, const INode *node, double length_, const Cursor &cursor, short orientation)
Cursor getBranchCursor(double position) const
void recursivePlot_(GraphicDevice &gDevice, INode &node, double x, double &y, double hDirection, double vDirection, unsigned int &tipCounter) const
void drawDendrogram_(GraphicDevice &gDevice) const
void setTree(const Tree *tree=0)
Data structure describing a plotting direction.
Cursor getTranslation(double x, double y) const
virtual const Cursor & getCursor() const
Event class that uses INode object (more efficient than relying on nodes id, but less generic).
const INode * getINode() const
Event class that uses INode object (more efficient than relying on nodes id, but less generic).
Event class used by TreeDrawing classes.
static short TEXT_HORIZONTAL_LEFT
static short TEXT_HORIZONTAL_RIGHT
virtual void drawLine(double x1, double y1, double x2, double y2)=0
const NodeTemplate< NodeInfos > * getSon(size_t i) const
virtual const NodeInfos & getInfos() const
virtual bool isLeaf() const
virtual size_t getNumberOfSons() const
Basal interface for tree drawing classes.
Interface for phylogenetic tree objects.
Defines the basic types of data flow nodes.