public static class DynamicAnchor.OrthogonalProjectionStrategy extends DynamicAnchor.AbstractComputationStrategy
DynamicAnchor.IComputationStrategy
that computes anchor position by
orthogonally projecting the respective anchored reference point to the
outline of the anchorage reference geometry so that the respective point
has minimal distance to the anchored reference point and resembles the
same x- (vertical projection) or y-coordinate (horizontal projection).Constructor and Description |
---|
OrthogonalProjectionStrategy() |
Modifier and Type | Method and Description |
---|---|
Point |
computePositionInScene(javafx.scene.Node anchorage,
javafx.scene.Node anchored,
Point anchoredReferencePointInLocal)
Computes an anchor position based on the given anchorage visual,
anchored visual, and anchored reference point.
|
static Point |
getNearestBoundsProjection(IGeometry g,
Point p)
Returns the nearest projection onto the given geometry's rectangular
bounds.
|
getAnchorageReferenceGeometryInLocal, getAnchorageReferenceGeometryInScene, getOutlineGeometry, getOutlineSegments
public static Point getNearestBoundsProjection(IGeometry g, Point p)
public Point computePositionInScene(javafx.scene.Node anchorage, javafx.scene.Node anchored, Point anchoredReferencePointInLocal)
DynamicAnchor.IComputationStrategy
anchorage
- The anchorage visual.anchored
- The anchored visual.anchoredReferencePointInLocal
- The anchored reference point within the local coordinate
system of the anchored visual.Copyright (c) 2014 itemis AG and others. All rights reserved.