Interface Rectangle

  • All Superinterfaces:
    Shape
    All Known Implementing Classes:
    RectangleImpl

    public interface Rectangle
    extends Shape
    A rectangle aligned with the axis (i.e. it is not at an angle).

    In geospatial contexts, it may cross the international date line (-180 longitude) if getCrossesDateLine() however it cannot pass the poles although it may span the globe. It spans the globe if the X coordinate (Longitude) goes from -180 to 180 as seen from getMinX() and getMaxX().

    • Method Detail

      • reset

        void reset​(double minX,
                   double maxX,
                   double minY,
                   double maxY)
        Expert: Resets the state of this shape given the arguments. This is a performance feature to avoid excessive Shape object allocation as well as some argument error checking. Mutable shapes is error-prone so use with care.
      • getWidth

        double getWidth()
        The width. In geospatial contexts, this is generally in degrees longitude and is aware of the dateline (aka anti-meridian). It will always be >= 0.
      • getHeight

        double getHeight()
        The height. In geospatial contexts, this is in degrees latitude. It will always be >= 0.
      • getMinX

        double getMinX()
        The left edge of the X coordinate.
      • getMinY

        double getMinY()
        The bottom edge of the Y coordinate.
      • getMaxX

        double getMaxX()
        The right edge of the X coordinate.
      • getMaxY

        double getMaxY()
        The top edge of the Y coordinate.
      • getCrossesDateLine

        boolean getCrossesDateLine()
        Only meaningful for geospatial contexts.