Table of Contents

Class SpiralLayout

Namespace
Northwoods.Go.Layouts.Extensions
Assembly
SpiralWinForms.dll

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

public class SpiralLayout : NetworkLayout<SpiralNetwork, SpiralVertex, SpiralEdge, SpiralLayout>
Inheritance
SpiralLayout
Inherited Members

Remarks

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

Constructors

SpiralLayout()

Create a Spiral Layout.

public SpiralLayout()

Properties

Clockwise

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

public bool Clockwise { get; set; }

Property Value

bool

Remarks

The default value is true.

Radius

Gets or sets the radius distance.

public double Radius { get; set; }

Property Value

double

Remarks

The default value is NaN.

Spacing

Gets or sets the spacing between nodes.

public double Spacing { get; set; }

Property Value

double

Remarks

The default value is 100.

Methods

Diameter(SpiralVertex)

Compute the effective diameter of a Node.

public static double Diameter(SpiralVertex v)

Parameters

v SpiralVertex

Returns

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.

public override void DoLayout(IEnumerable<Part> coll = null)

Parameters

coll IEnumerable<Part>

Remarks

This respects the Spacing property to affect the layout.