public final class VoidPathGeometry extends Object implements IPathGeometry
IPathGeometry interface that does nothing and behaves like an empty path.
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.
| Modifier and Type | Field and Description |
|---|---|
static VoidPathGeometry |
INSTANCE
The
VoidPathGeometry singleton. |
| Modifier and Type | Method and Description |
|---|---|
static VoidPathGeometry |
getInstance()
Returns the
com.yworks.yfiles.common.drawing.VoidPathGeometry singleton. |
GeneralPath |
getPath()
Returns a representation of the visible path of the edge in form of a
GeneralPath. |
int |
getSegmentCount()
Returns the number of "segments" this edge's path consists of.
|
Tangent |
getTangent(double ratio)
Calculates the tangent on the edge's path at the given ratio point.
|
Tangent |
getTangent(int segmentIndex,
double ratio)
Calculates the tangent on the edge's path at the given ratio point for the given segment.
|
public static final VoidPathGeometry INSTANCE
VoidPathGeometry singleton.public static VoidPathGeometry getInstance()
com.yworks.yfiles.common.drawing.VoidPathGeometry singleton.com.yworks.yfiles.common.drawing.VoidPathGeometry singleton.public final GeneralPath getPath()
IPathGeometryGeneralPath.getPath in interface IPathGeometrynull if this is not applicable for the current geometry.public final int getSegmentCount()
IPathGeometrygetSegmentCount in interface IPathGeometry-1 if there is no such thing as a segment for this edge.public final Tangent getTangent(double ratio)
IPathGeometrygetTangent in interface IPathGeometryratio - a value in [0,1] where 0 is the source's end and 1 is at the target's end of the visible edge pathpublic final Tangent getTangent(int segmentIndex, double ratio)
IPathGeometrygetTangent in interface IPathGeometrysegmentIndex - the segment to use for the calculationratio - a value in [0,1] where 0 is the source's end and 1 is at the target's end of the segmentIPathGeometry.getTangent(double),
IPathGeometry.getSegmentCount()