Module omix.api

Class ShapeUtility

java.lang.Object
omix.util.math.curves.ShapeUtility

public abstract class ShapeUtility
extends Object
This class provides miscellaneous computation methods for shapes.
Author:
Dr. Peter Droste, Omix Visualization
  • Method Details

    • getDockingPosition

      public static Vec2d getDockingPosition​(DockingPosition dock, Shape shape, Rectangle2D bounds)
      computes the docking position on a certain shape (this method is not yet implemented and does currently return (0,0))
      Parameters:
      dock - the docking position
      shape - the shape of the figure
      bounds - the bounds of the figure
      Returns:
      the coordinate of the docking position on the shape
    • getAWTShape

      public static Shape getAWTShape​(Shape shape, Rectangle2D.Double bounds)
      This method converts a Shape into a Shape.
      Parameters:
      shape - omix.lang.Shape object
      bounds - bounds of the shape
      Returns:
      java.awt.Shape object
    • computeShape

      public static Shape computeShape​(Rectangle2D bounds, Shape shape, Map<DockingPosition,​Point2D> edgePorts)
      This method converts a Shape into a Shape and returns a Map of docking positions.
      Parameters:
      shape - omix.lang.Shape object
      bounds - bounds of the shape
      edgePorts - output map for the computed dock positions.
      Returns:
      java.awt.Shape object