Nevron .NET Vision
Diagram for .NET / User's Guide / Document Object Model / Models / Shapes / Bridgeable Shapes and Bridges

In This Topic
    Bridgeable Shapes and Bridges
    In This Topic

    Bridges (hops) are a special type of decoration of flat open figure paths, which can be displayed on path self intersections or intersections with other bridgeable paths below it in the ZOrder. Three types of objects are involved in bridging:

     Bridgeable Paths

    Path primitives, which can display bridges are called bridgeable paths. Bridgeable paths implement the INBridgeablePath interface. Currently this interface is implemented by the NLinePath and NPolylinePath classes.

    The size and shape of the bridges displayed by a bridgeable path is specified by the composed NBridgeStyle of the path. The currently supported bridge shapes are enumerated by the BridgeShape enumeration.

    In order to display bridges the bridgeable path must be aggregated by a bridgeable 1D shape.

     Bridgeable Shapes
    Bridgeable shapes are such shapes, which implement the INBridgeableShape interface (for example NLineShape, NPolylineShape, NRoutableConnector etc.).

    It is more convenient to think that shapes (not their primitives) display bridges. That is why the bridge targets are specified on a per shape basis with the help of the BridgeTargets property (accepts values from the BridgeTargets enumeration). The bridge targets specify what types of bridges must be created for the primitive, which the shape aggregates.

    Only bridgeable shapes of type Shape1D can display bridges. This means that if you change the shape type of a bridgeable shape to Shape2D the bridges displayed by it's primitive will automatically disappear. This is because bridges are only necessary when a logical connection crosses another logical connection.
     Bridge Manager

    The bridge manager is represented by an instance of the NBridgeManager class, which can be obtained from the BridgeManager property of the NDrawingDocument class.

    The bridge manager is responsible for creating bridged paths for the bridgeable paths contained in a drawing. The bridged paths generation obeys to several aesthetic criterias, the most important of which are:

    1. When two bridges, which belong to the same bridgeable path segment overlap, they are merged to create a larger bridge.
    2. Bridges are not created for intersection points, which are closer than half the bridge width to the start or end point of the bridgeable path segment to which they belong.

    The bridge manager can be enabled or disabled, which is specified by the Enabled property. When the bridge manager is disabled it will not generate bridged paths and all bridgeable paths will be displayed without bridges.

     Related Examples
    Windows Forms: Document Object Model - Shapes - Bridgeable Shapes
    See Also