VisualTreeNode

References
public sealed class VisualTreeNode
A single node in a tree diagram.

Constructors

VisualTreeNode

#
public VisualTreeNode(Path path, bool implied)
Create a new node.
path (Path)
implied (bool)

Properties

ChildCount

#
public int ChildCount { get; }
Gets the number of child nodes.

Disc

#
public CircleF Disc { get; }
Gets the visual disc of this node. This is set during drawing.

Implied

#
public bool Implied { get; }
Gets whether this path is implied.

ItemCount

#
public int ItemCount { get; }
Gets the number of items.

LayerIndex

#
public int LayerIndex { get; }
Gets the index of the layer for this node. This will be set during layout.

Location

#
public PointF Location { get; }
Gets the location of this node. This is set during layout.

Path

#
public Path Path { get; }
Gets the path for this node. The root note will have a null path.

PathIndex

#
public int PathIndex { get; }
Gets the index of the column for this node. This will be set during layout.

Root

#
public static VisualTreeNode Root { get; }

TotalItemCount

#
public int TotalItemCount { get; }
Gets the total fruit count in the tree starting at this node.

Methods

Append

#
public void Append(Path path, Color item)
Append a new item to this node, or one of its child nodes.
path (Path)
item (Color)

ChildAt

#
public VisualTreeNode ChildAt(int index)
Gets the child at the given index.
index (int)

Draw

#
public void Draw(Graphics graphics, VisualTreeStyling styling, Action betweenLayersAndBranches, Action betweenBranchesAndFruit, Action betweenFruitAndLabels)
Draw this node and all child nodes with callbacks for in between stages.
graphics (Graphics)
styling (VisualTreeStyling)
betweenLayersAndBranches (Action)
betweenBranchesAndFruit (Action)
betweenFruitAndLabels (Action)

Draw

#
public void Draw(Graphics graphics, VisualTreeStyling styling)
Draw this node and all child nodes.
graphics (Graphics)
styling (VisualTreeStyling)

Find

#
public Path Find(PointF point, float radius)
Find the path belonging to the bezier.
point (PointF)
radius (float)

Fruit

#
public static IEnumerable<CircleF> Fruit(PointF centre, int rotation, int count, float radius, float limit)
centre (PointF)
rotation (int)
count (int)
radius (float)
limit (float)

ItemAt

#
public Color ItemAt(int index)
Gets the item at the given index.
index (int)

Layout

#
public RectangleF Layout(PointF root, PointF centre, float innerRadius, float outerRadius)
Perform layout on this node and all child nodes.
root (PointF)
centre (PointF)
innerRadius (float)
outerRadius (float)