Class RectangleConnector

All Implemented Interfaces:
Connector

public class RectangleConnector extends LocatorConnector
RectangleConnector.
Author:
Werner Randelshofer
  • Constructor Details

    • RectangleConnector

      public RectangleConnector()
    • RectangleConnector

      public RectangleConnector(Locator locator)
  • Method Details

    • intersect

      public @Nullable IntersectionPointEx intersect(@NonNull RenderContext ctx, Figure connection, @NonNull Figure target, @NonNull javafx.geometry.Point2D start, @NonNull javafx.geometry.Point2D end)
      Description copied from interface: Connector
      Returns 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 context
      connection - the connection figure
      target - the target figure
      start - the start point of the line in world coordinates, should be inside the target figure
      end - 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.