Allows adding bridge visualizations to a GeneralPath.
Inheritance Hierarchy
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.
See Also
API
- BridgeManager
Demos
- Shows the capabilities of the
BridgeManagerclass for inserting bridges into edge paths.
Members
No filters for this type
Methods
Called by the BridgeManager if the getCrossingStyle method yields CUSTOM to actually insert a bridge into the given GeneralPath.
Called by the BridgeManager if the getCrossingStyle method yields CUSTOM to actually insert a bridge into the given GeneralPath.
When this method is called, the GeneralPath's last coordinates are not yet at
start. So most implementations should first moveTo that location. Also, at the end of the call, the 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.abstract
Parameters
- 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.
Gets the height of the bridge for the given IRenderContext.
The height is the default height that will be used for drawing the non-CUSTOM BridgeCrossingStyles.
abstract
Parameters
- context: IRenderContext
- The context where the bridge will be created for.
Return Value
- number
- The non-negative preferred basic unscaled height of the bridge.
Gets the width of the bridge for the given IRenderContext.
Gets the width of the bridge for the given IRenderContext.
The width is the preferred length of the segment that will be removed from the original segment if it crosses an obstacle. That bridge will be made larger if multiple obstacle bridges would otherwise overlap. The bridge will be automatically made smaller if it happens to be near the end of a segment and would otherwise extend beyond the end of the segment.
abstract
Parameters
- context: IRenderContext
- The context where the bridge will be created for.
Return Value
- number
- The positive preferred width of the bridge.
Gets the BridgeCrossingStyle to use in the given IRenderContext.
Gets the BridgeCrossingStyle to use in the given IRenderContext.
abstract
Parameters
- context: IRenderContext
- The context in which the crossing will be used.
Return Value
Gets the BridgeOrientationStyle to use in the given IRenderContext.
Gets the BridgeOrientationStyle to use in the given IRenderContext.
abstract
Parameters
- context: IRenderContext
- The context in which the style will be used.
Return Value
- BridgeOrientationStyle
- The style to use. Any value can be returned and will be ignored if the crossing style is set to CUSTOM.