A void implementation of the IPathGeometry interface that does nothing and behaves like an empty path.
Remarks
This class implements the singleton pattern. Use the shared static INSTANCE of this class instead of
null
were null
is not allowed. The VoidEdgeStyleRenderer does so for example.Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.VoidPathGeometry
Methods
Returns a representation of the visible path of the edge in form of a GeneralPath
Returns
- ↪GeneralPath
- An instance that describes the visible path or
null
if this is not applicable for the current geometry.
Implements
Returns the number of "segments" this edge's path consists of.
Returns
- ↪number
- the number of segments or
-1
if there is no such thing as a segment for this edge.
Implements
Calculates the tangent on the edge's path at the given ratio point.
Remarks
Implementers are not required to return a tangent with normalized vector, and therefore callers should not expect to receive a tangent with normalized vector.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- ratio - number
- a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge path
Returns
- ↪Tangent
- The tangential line, if any exists.
Implements
Calculates the tangent on the edge's path at the given ratio point for the given segment.
Remarks
Implementers are not required to return a tangent with normalized vector, and therefore callers should not expect to receive a tangent with normalized vector.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- segmentIndex - number
- the segment to use for the calculation
- ratio - number
- a value in [0,1] where 0 is the source's end and 1 is at the target's end of the segment
Returns
- ↪Tangent
- The tangential line, if any exists.
See Also
Implements
Constants
The VoidPathGeometry singleton.