public class ChopBoxStrategy extends ProjectionStrategy
IComputationStrategy.Parameter<T>
Constructor and Description |
---|
ChopBoxStrategy() |
Modifier and Type | Method and Description |
---|---|
protected Point |
computeAnchorageReferencePointInLocal(javafx.scene.Node anchorage,
IGeometry geometryInLocal,
Point anchoredReferencePointInAnchorageLocal)
Computes the anchorage reference position within the coordinate system of
the given
IGeometry . |
protected Point |
computeAnchorageReferencePointInScene(javafx.scene.Node anchorage,
IGeometry geometryInLocal,
Point anchoredReferencePointInScene)
Computes the anchorage reference position in scene coordinates, based on
the given anchorage geometry.
|
Point |
computePositionInScene(javafx.scene.Node anchorage,
javafx.scene.Node anchored,
java.util.Set<IComputationStrategy.Parameter<?>> parameters)
Computes an anchor position based on the given anchorage visual, anchored
visual, and anchored reference point.
|
computeProjectionInScene, getOutlineSegments, getRequiredParameters
protected Point computeAnchorageReferencePointInLocal(javafx.scene.Node anchorage, IGeometry geometryInLocal, Point anchoredReferencePointInAnchorageLocal)
IGeometry
. For an IShape
geometry, the center
is used if it is contained within the shape, otherwise, the vertex
nearest to the center is used as the reference position. For an
ICurve
geometry, the first point is used as the reference
position.anchorage
- The anchorage visual.geometryInLocal
- The anchorage geometry within the local coordinate system of
the anchorage visual.anchoredReferencePointInAnchorageLocal
- Refernce point of the anchored for which to determine the
anchorage reference point. Within the local coordinate system
of the anchorage.IGeometry
.protected Point computeAnchorageReferencePointInScene(javafx.scene.Node anchorage, IGeometry geometryInLocal, Point anchoredReferencePointInScene)
anchorage
- The anchorage visual.geometryInLocal
- The anchorage geometry within the coordinate system of the
anchorage visual.anchoredReferencePointInScene
- The reference Point
of the anchored for which the
anchorage reference Point
is to be determined.computeAnchorageReferencePointInLocal(Node, IGeometry, Point)
public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, java.util.Set<IComputationStrategy.Parameter<?>> parameters)
IComputationStrategy
computePositionInScene
in interface IComputationStrategy
computePositionInScene
in class ProjectionStrategy
anchorage
- The anchorage visual.anchored
- The anchored visual.parameters
- The available computation parameters. strategy.Copyright (c) 2014 itemis AG and others. All rights reserved.