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

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

Data

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

DataCount

#
public int DataCount { get; }

IsEmpty

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

IsLeaf

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

IsRoot

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

IsTrunk

#
public bool IsTrunk { get; }

Length

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

LongestPathLength

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

Offset

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

Parent

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

Path

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

Selected

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

Twigs

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

Methods

BG_Colour

#
protected Color BG_Colour()

Distribute_Phylogenetic

#
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.
public void Distribute_Phylogenetic(
max_path_length_inverse
The inverse of the tree longest path length: 1.0 / MaxPathLength
)

FG_Colour

#
protected Color FG_Colour()

GrowTree

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

RenderBranchTag

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

RenderDot

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

RenderNodes

#
public void RenderNodes()

RenderTags

#
public void RenderTags()

RenderTextDot

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

RenderWires_Organic

#
public void RenderWires_Organic()

RenderWires_Schematic

#
public void RenderWires_Schematic()

SelectAll

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

SelectAll

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

SolveBezier

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

SolveLeafAngles

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