NShape Reference
FlowLayouter Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Layouters >

NShape Reference
FlowLayouter Class

Previous pageReturn to chapter overviewNext page

Orders the shapes into layers, such that most of the arrows point downwards and if possible also only to the next layer.

Syntax

public class FlowLayouter : LayouterBaseILayouter

Description

Orders the shapes into layers, such that most of the arrows point downwards and if possible also only to the next layer.

All lines that have non-identical caps count as arrows from their first to their last vertex. Lines with identical caps count as arrows in both directions. Lines without caps do not count at all. We only regard point-to-shape connections. Point-to-point connections would required rotating the shapes what we should/want/must not do in a layouter.

The algorithm consists of three phases:

1.Optimize Levels:
Moves single shapes up or down one layer if it improves its characteristics.
2.Ordering:
Orders the shapes within one layer such that lines do not cross so much.
3.Positioning:
Positions shapes within one layer such that there connected shapes are nearer.

These phases are repeated until a stable state or the maximum number of steps is reached.

Public Types

Name

Description

FlowDirection

An enum that defines the desired order of the shapes.

Public Properties

Name

Description

Direction

Gets or sets the desired ordering of the shapes.

LayerDistance

Gets or sets the distance between layers.

RowDistance

Gets or sets the distance between shapes within a layer.

Requirements

Namespace: Dataweb.NShape.Layouters

Assembly: Dataweb.NShape