Class SpiralLayout

GoDiagram®
v10.0.11
by Northwoods Software®

A custom Layout that lays out a chain of nodes in a spiral.

Namespace: Northwoods.Go.Layouts.Extensions
Assembly: SpiralWinForms.dll
Syntax
public class SpiralLayout : NetworkLayout<SpiralNetwork, SpiralVertex, SpiralEdge, SpiralLayout>
Remarks

This layout assumes the graph is a chain of Nodes, Spacing controls the spacing between nodes.

Constructors

SpiralLayout()

Create a Spiral Layout.

Declaration
public SpiralLayout()

Properties

Clockwise

Gets or sets whether the spiral should go clockwise or counter-clockwise.

Declaration
public bool Clockwise { get; set; }
Property Value
Type Description
bool
Remarks

The default value is true.

Radius

Gets or sets the radius distance.

Declaration
public double Radius { get; set; }
Property Value
Type Description
double
Remarks

The default value is NaN.

Spacing

Gets or sets the spacing between nodes.

Declaration
public double Spacing { get; set; }
Property Value
Type Description
double
Remarks

The default value is 100.

Methods

Diameter(SpiralVertex)

Compute the effective diameter of a Node.

Declaration
public static double Diameter(SpiralVertex v)
Parameters
Type Name Description
SpiralVertex v
Returns
Type Description
double

DoLayout(IEnumerable<Part>)

This method actually positions all of the Nodes, assuming that the ordering of the nodes is given by a single link from one node to the next.

Declaration
public override void DoLayout(IEnumerable<Part> coll = null)
Parameters
Type Name Description
IEnumerable<Part> coll
Overrides
Remarks

This respects the Spacing property to affect the layout.