( a feature of FlowChartX Pro edition)
Implements a grid graph layout algorithm.
VB6
![]() |
---|
Public Class GridLayout |
C++
![]() |
---|
class GridLayout |
The GridLayout algorithm arranges diagram nodes in a grid, keeping connected nodes close together. The algorithm strives to achieve a small number of arrow crossings and routes arrows through the grid so they do not cross any node.
To apply the layout to a diagram, create a GridLayout instance, set its members and invoke the ArrangeDiagram method. If there are several unconnected graphs in the diagram, it is possible to specify which of them to arrange by means of the Root property.
The distance between points in the layout grid can be changed via GridSize. Nodes to be placed at the upper-left and lower-right corners of the grid can be assigned to StartNode and EndNode.
The grid layout routine is based on an iterative process whose initial steps shuffle the grid nodes randomly. That can lead to very different results each time the algorithm is run. If that is not desired, assign an explicit value to the RandomSeed property.
ArrowAnchoring specifies whether the layout algorithm must attach arrows to the anchor points of graphs nodes.