Nevron .NET Vision Documentation
Shape Navigation

Shape navigation refers to the built-in abilities in the NShape class to easily obtain the shapes, which are connected to a specific shape. The routines involved in shape navigation can in general fall into two categories:

1D Shapes Specific Navigation

Each 1D shape can be treated as a directed connector, which connects two other shapes.

The shape to whose port the start plug of a 1D shape is connected is called from shape. The from shape is controlled by the FromShape property. Setting this property will perform an implicit connection of the start plug.

The shape to whose port the end plug of 1D shape is connected is called to shape. The to shape is controlled by the ToShape property. Setting this property will perform an implicit connection of the end plug.

A 1D shape is said to be reflexive (e.g. self-loop), if its FROM and TO shapes are the same shape. You can easily check whether a 1D shape is reflexive with the help of the IsReflexive property.

You can get a list containing non duplicate FROM and TO shapes with the help of the GetShapesConnectedToPlugs method.

Generic Shape Navigation

Since each type of shape (1D and 2D shapes) can have ports, the following shape navigation methods are applicable for all types of shapes.

An incoming shape is such 1D shape, whose end plug is connected to a port of the shape. You can get the incoming shapes with the help of the GetIncomingShapes method. Analogously An outgoing shape is such 1D shape, whose start plug is connected to a port of the shape. You can get the outgoing shapes with the help of the GetOutgoingShapes method.

The to shape of an outgoing shape is said to be a destination shape. You can get the destination shapes with the help of the GetDestinationShapes method. Analogously the from shape of an incoming shape is said to be a source shape. You can get the source shapes with the help of the GetSourceShapes method. The union of the source and destination shapes forms the set of neighbour shapes.

A successor shape is such a shape, which is either a destination shape or a successor shape of a destination shape. The successor shapes can be obtained from the GetSuccessorShapes method. Analogously a predecessor shape is such a shape, which is either a source shape or a predecessor shape of a source shape. The predecessor shapes can be obtained from the GetPredecessorShapes method.

An accessible shape is such a shape, which is either a neighbour shape or an accessible shape of a neighbour shape. The accessible shapes can be obtained from the GetAccessibleShapes method.

You can get the shapes, which reflex a shape with the help of the GetReflexiveShapes method.

You can get the shapes, which connect to the ports of the shape with the help of the GetShapesConnectedToPorts method.

Related Examples
Windows Forms: Document Object Model - Shapes - Shape Translation Slaves
See Also

 

 


©2017. Nevron Software LLC.

Send Feedback