Allows to add bridge visualizations to a GeneralPath.
Remarks
An implementation of this interface is used by BridgeManager to insert bridges into an edge path.
A custom implementation of this interface is necessary if a custom bridge drawing style is used.
Related Programming Samples
- Bridges
- Shows the capabilities of the
BridgeManager
class for inserting bridges into edge paths.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.IBridgeCreator
See Also
Methods
createCustomBridge
(context: IRenderContext, path: GeneralPath, start: Point, end: Point, gapLength: number)Called by the BridgeManager if the getCrossingStyle method yields CUSTOM to actually insert a bridge into the given GeneralPath.
Remarks
start
. So most implementation should first moveTo that location. Also at the end of the call, implementation should make sure that the GeneralPath's end is at end
. The gapLength
is provided for convenience so that the distance between startPoint
and endPoint
does not need to be calculated if it is needed for the drawing.Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context for the call.
- path - GeneralPath
- The path to append the bridge segment to.
- start - Point
- The coordinates of the starting point of the bridge.
- end - Point
- The coordinates of the ending point of the bridge.
- gapLength - number
- The distance between the starting point and the end point.
Gets the height of the bridge for the given IRenderContext.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context where the bridge will be created for.
Returns
- ↪number
- The non-negative preferred basic unscaled height of the bridge.
Gets the width of the bridge for the given IRenderContext.
Remarks
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context where the bridge will be created for.
Returns
- ↪number
- The positive preferred width of the bridge.
Gets the BridgeCrossingStyle to use in the given IRenderContext.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context in which the crossing will be used.
Returns
Gets the BridgeOrientationStyle to use in the given IRenderContext.
Parameters
A map of options to pass to the method.
- context - IRenderContext
- The context in which the style will be used..
Returns
- ↪BridgeOrientationStyle
- The style to use. Any value can be returned and will be ignored if the crossing style is set to CUSTOM.
Static Methods
Creates an implementation of the interface IBridgeCreator from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- getCrossingStyle - function(IRenderContext):BridgeCrossingStyle
Gets the BridgeCrossingStyle to use in the given IRenderContext.
This property holds the implementation for getCrossingStyle.
- getOrientationStyle - function(IRenderContext):BridgeOrientationStyle
Gets the BridgeOrientationStyle to use in the given IRenderContext.
This property holds the implementation for getOrientationStyle.
- getBridgeWidth - function(IRenderContext):number
Gets the width of the bridge for the given IRenderContext.
This property holds the implementation for getBridgeWidth.
- getBridgeHeight - function(IRenderContext):number
Gets the height of the bridge for the given IRenderContext.
This property holds the implementation for getBridgeHeight.
- createCustomBridge - function(IRenderContext, GeneralPath, Point, Point, number):void
Called by the BridgeManager if the getCrossingStyle method yields CUSTOM to actually insert a bridge into the given GeneralPath.
This property holds the implementation for createCustomBridge.
Returns
- ↪IBridgeCreator
- An instance of the IBridgeCreator interface based on the given definition.