Class Shape

    • Method Detail

      • overlaps

        public static boolean overlaps​(Rectangle2D extent,
                                       Rectangle2D shape)
        overlaps extent and shape. Overlap = Intersect + Contain
        Parameters:
        extent - Rectangle2D; the extent
        shape - Rectangle2D; the shape
        Returns:
        whether extent overlaps shape
      • intersects

        public static boolean intersects​(Rectangle2D r1,
                                         Rectangle2D r2)
        do the rectangles really intersect (so, not being contained)?
        Parameters:
        r1 - Rectangle2D; the first rectangle
        r2 - Rectangle2D; the second rectangle
        Returns:
        whether r1 really intersects r2
      • contains

        public static boolean contains​(Rectangle2D r1,
                                       Rectangle2D r2)
        is r1 completely in r2.
        Parameters:
        r1 - Rectangle2D; the first rectangle
        r2 - Rectangle2D; the second rectangle
        Returns:
        whether r1 in r2