public class EdgeSegmentSnapLine extends SnapLine
SnapLine that is parallel to an edge segment and stores that edge.
In addition to the line itself, this class has three special nape locations the represent the source, center and end
location of the related edge segment. All snap lines of this type have the SnapType SnapLineSnapTypes.CENTER
and the ResourceKey SnapLine.SNAP_LINE_EDGE_SEGMENT_KEY.
GRID_LINE_FIXED_LINE_KEY, SNAP_LINE_BLANK_VARIABLE_LINE_KEY, SNAP_LINE_CENTER_BETWEEN_BOUNDS_KEY, SNAP_LINE_CENTER_BETWEEN_CENTERS_KEY, SNAP_LINE_EDGE_SEGMENT_KEY, SNAP_LINE_EQUAL_DISTANCE_BETWEEN_BOUNDS_KEY, SNAP_LINE_EQUAL_DISTANCE_BETWEEN_CENTERS_KEY, SNAP_LINE_EQUAL_HEIGHT_KEY, SNAP_LINE_EQUAL_WIDTH_KEY, SNAP_LINE_EXTENDED_VARIABLE_LINE_KEY, SNAP_LINE_FIXED_DISTANCE_KEY, SNAP_LINE_FIXED_LINE_KEY, SNAP_LINE_PEN_KEY, SNAP_LINE_VARIABLE_LINE_KEY, SNAP_TO_GRID_KEY| Constructor and Description |
|---|
EdgeSegmentSnapLine(IEdge edge,
PointD segmentSource,
PointD segmentTarget,
double distance,
int segmentIndex)
Initializes a new instance of the
PointBasedSnapLine class. |
EdgeSegmentSnapLine(IEdge edge,
PointD from,
PointD to,
PointD segmentSource,
PointD segmentTarget,
double distance,
int segmentIndex,
Object tag,
double weight)
Initializes a new instance of the
PointBasedSnapLine class. |
| Modifier and Type | Method and Description |
|---|---|
PointD |
getDirection()
Gets the direction vector of this snap line.
|
double |
getDistance()
Gets the distance of this snap line from its related edge segment.
|
IEdge |
getEdge()
Gets the edge that is associated with this snap line.
|
int |
getSegmentIndex()
Gets the segment index of the related edge segment.
|
PointD |
getSegmentSource()
Gets the location that represents the source of the related segment on this line.
|
PointD |
getSegmentTarget()
Gets the location that represents the target of the related segment on this line.
|
PointD |
getSourceMarker()
Gets the location of the source marker of this snap line.
|
PointD |
getTargetMarker()
Gets the location of the target marker of this snap line.
|
void |
setSourceMarker(PointD value)
Sets the location of the source marker of this snap line.
|
void |
setTargetMarker(PointD value)
Sets the location of the target marker of this snap line.
|
getCoordinates, getFrom, getResourceKey, getSnapType, getTag, getTo, getWeight, setFrom, setTopublic EdgeSegmentSnapLine(IEdge edge, PointD segmentSource, PointD segmentTarget, double distance, int segmentIndex)
PointBasedSnapLine class.edge - The edge to assign to Edge.segmentSource - The location that represents the source of the related segment on this line. In addition, this location is used as From
location.segmentTarget - The location that represents the target of the related segment on this line. In addition, this location is used as To
location.distance - The distance of this snap line from its related edge segment.segmentIndex - The segment index of the related edge segment.public EdgeSegmentSnapLine(IEdge edge, PointD from, PointD to, PointD segmentSource, PointD segmentTarget, double distance, int segmentIndex, Object tag, double weight)
PointBasedSnapLine class.edge - The edge to assign to Edge.from - The first location that delimits this snap line.to - The second location that delimits this snap line.segmentSource - The location that represents the source of the related segment on this line.segmentTarget - The location that represents the target of the related segment on this line.distance - The distance of this snap line from its related edge segment.segmentIndex - The segment index of the related edge segment.tag - A tag that is associated with this snap line.weight - The weight (importance) of this snap line.public final PointD getDirection()
public final double getDistance()
public final IEdge getEdge()
public final int getSegmentIndex()
public final PointD getSegmentSource()
public final PointD getSegmentTarget()
public final PointD getSourceMarker()
If this is null, the location of the SegmentSource is marked instead.
setSourceMarker(PointD)public final PointD getTargetMarker()
If this is null, the location of the SegmentTarget is marked instead.
setTargetMarker(PointD)public final void setSourceMarker(PointD value)
If this is null, the location of the SegmentSource is marked instead.
value - The SourceMarker to set.getSourceMarker()public final void setTargetMarker(PointD value)
If this is null, the location of the SegmentTarget is marked instead.
value - The TargetMarker to set.getTargetMarker()