GH_GraphicBranch

References
public class GH_GraphicBranch

Fields

DomainAngleFactor

#
public static float DomainAngleFactor

m_angle

#
protected float m_angle

m_data

#
protected IList m_data

m_length

#
protected float m_length

m_offset

#
protected float m_offset

m_parent

#
protected GH_GraphicBranch m_parent

m_path

#
protected GH_Path m_path

m_selected

#
protected bool m_selected

m_twigs

#
protected List<GH_GraphicBranch> m_twigs

TwigLengthFactor

#
public static float TwigLengthFactor

TwigLengthMin

#
public static float TwigLengthMin

Properties

Angle

#
public float Angle { get; set; }
Gets or sets the angle (in radians, counter-clock wise from the world x-axis) of this branch.

Data

#
public IList Data { get; set; }
Gets or sets the data contained in this branch.

DataCount

#
public int DataCount { get; }

IsEmpty

#
public bool IsEmpty { get; }
A branch is considered to be empty if it contains no data items.

IsLeaf

#
public bool IsLeaf { get; }
A branch is considered to be a lead if it lacks twigs.

IsRoot

#
public bool IsRoot { get; }
A branch is considered to be a root if it lacks a parent.

IsTrunk

#
public bool IsTrunk { get; }

Length

#
public float Length { get; set; }
Gets or sets the Length factor of this branch.

LongestPathLength

#
public int LongestPathLength { get; }
Find the longest path in this subtree. This property is forwards recursive, meaning children will be measures, but siblings are ignored.

Offset

#
public float Offset { get; set; }
Gets or sets the distance factor from the start of the branch to the graph origin.

Parent

#
public GH_GraphicBranch Parent { get; set; }
Gets or sets the parent of this branch

Path

#
public GH_Path Path { get; set; }
Gets or sets the data tree path of this branch

Selected

#
public bool Selected { get; set; }
Gets or sets a value that represents the selected state of this branch. Setting this value does not affect child branches.

Twigs

#
public List<GH_GraphicBranch> Twigs { get; set; }
Gets or set the twigs (sub branches) of this branch. If you're setting twigs, consider using the specialized functions instead.

Methods

BG_Colour

#
protected Color BG_Colour()

Distribute_Phylogenetic

#
public void Distribute_Phylogenetic(double max_path_length_inverse)
Distribute this branch and all subbranches based on an inward solving algorithm. This distribution results in a standard phylogenetic tree layout. Before this function is called it is important that all Leaf branches already have a correct angle.
max_path_length_inverse (double)The inverse of the tree longest path length: 1.0 / MaxPathLength

FG_Colour

#
protected Color FG_Colour()

GrowTree

#
public void GrowTree(List<GH_Path> paths)
Recursively grow a tree that contains all the given paths. This branch will become a new Root.
paths (List<GH_Path>)Paths to include

RenderBranchTag

#
protected void RenderBranchTag(Graphics G, PointF anchor, Font font, Color color_fg, Color color_bg)
G (Graphics)
anchor (PointF)
font (Font)
color_fg (Color)
color_bg (Color)

RenderDot

#
protected void RenderDot(Graphics G, PointF center, float radius, Color colour)
G (Graphics)
center (PointF)
radius (float)
colour (Color)

RenderNodes

#
public void RenderNodes(Graphics G, GH_GraphicTreeDisplayArgs e)

RenderTags

#
public void RenderTags(Graphics G, GH_GraphicTreeDisplayArgs e)

RenderTextDot

#
protected void RenderTextDot(Graphics G, Point pt, string text, Font font, SizeF size, Color color_bg, Color color_fg)
G (Graphics)
pt (Point)
text (string)
font (Font)
size (SizeF)
color_bg (Color)
color_fg (Color)

RenderWires_Organic

#
public void RenderWires_Organic(Graphics G, GH_GraphicTreeDisplayArgs e)

RenderWires_Schematic

#
public void RenderWires_Schematic(Graphics G, GH_GraphicTreeDisplayArgs e)

SelectAll

#
public void SelectAll(bool bSelect)
Select or deselect this branch and all child branches.
bSelect (bool)True to select, False to deselect

SelectAll

#
public void SelectAll(GH_Path b_path)
Select or deselect all branches that start with a given path.
b_path (GH_Path)Path start to select

SolveBezier

#
protected void SolveBezier(GH_GraphicBranch twig, GH_GraphicTreeDisplayArgs e, ref PointF P0, ref PointF P1, ref PointF P2, ref PointF P3)
twig (GH_GraphicBranch)
e (GH_GraphicTreeDisplayArgs)
P0 (ref PointF)
P1 (ref PointF)
P2 (ref PointF)
P3 (ref PointF)

SolveLeafAngles

#
public void SolveLeafAngles(float angle, float spread, float angle_per_item, GH_GraphicTreeDisplayArgs args)
Collects all leafs in this tree and distributes them equally inside an angle domain.
angle (float)Main growth direction of tree (in radians).
spread (float)Allowed spread of tree (in radians).
angle_per_item (float)Maximum angle per item in radians. This results in a more friedly layout of sparse trees.
args (GH_GraphicTreeDisplayArgs)Display arguments to work with.