java.lang.Object
org.jhotdraw8.draw.connector.AbstractConnector
org.jhotdraw8.draw.connector.LocatorConnector
org.jhotdraw8.draw.connector.RectangleConnector
- All Implemented Interfaces:
Connector
RectangleConnector.
- Author:
- Werner Randelshofer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable IntersectionPointExintersect(RenderContext ctx, Figure connection, Figure target, javafx.geometry.Point2D start, javafx.geometry.Point2D end) Returns the intersection of the line going from start to end with the target figure.Methods inherited from class org.jhotdraw8.draw.connector.LocatorConnector
getLocator, getPointAndDerivativeInLocalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.connector.Connector
chopStart, chopStart, getPointAndDerivativeInWorld
-
Constructor Details
-
RectangleConnector
public RectangleConnector() -
RectangleConnector
-
-
Method Details
-
intersect
public @Nullable IntersectionPointEx intersect(RenderContext ctx, Figure connection, Figure target, javafx.geometry.Point2D start, javafx.geometry.Point2D end) Description copied from interface:ConnectorReturns the intersection of the line going from start to end with the target figure. The line must be given in world coordinates.- Parameters:
ctx- the render contextconnection- the connection figuretarget- the target figurestart- the start point of the line in world coordinates, should be inside the target figureend- the end point of the line in world coordinates, should be outside the target figure- Returns:
- the intersection in the interval [0,1], null if no intersection. In case of multiple intersections returns the largest value.
-