Represents a segment of a BorderLine in a graph or geometric representation.
Inheritance Hierarchy
BorderLineSegment
Remarks
A BorderLineSegment is defined by a starting position, an initial value, and a slope. The segment continues from its starting position with the specified slope, defining a linear function. This class also provides methods to retrieve the value at any given position along the segment, and to navigate between adjacent segments.
This class cannot be instantiated
Type Details
- yFiles module
- algorithms
Properties
Gets the ending position of this segment.
Remarks
If this segment is the last one in the sequence, the end will return Number.MAX_VALUE.
Property Value
The ending position of this segment.
Gets the next segment in the sequence.
Remarks
If the current segment has no successor, this property will return
null
.Property Value
The next segment, or
null
if there is no next segment.Gets the previous segment in the sequence.
Property Value
The previous segment, or
null
if there is no previous segment.Methods
Gets the value of the segment at the specified position.
Remarks
If the position lies outside the segment's range, the calculated value might be invalid. The position must be provided without any external offsets as the segment is not aware of them.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- position - number
- The position for which the value is to be retrieved.
Returns
- ↪number
- The value of the segment at the specified position.