Class ImageRectangleF


  • public class ImageRectangleF
    extends Object
    Tile image rectangle with floating point dimensions
    Author:
    osbornb
    • Constructor Detail

      • ImageRectangleF

        public ImageRectangleF​(float left,
                               float top,
                               float right,
                               float bottom)
        Constructor
        Parameters:
        left - left pixel
        top - top pixel
        right - right pixel
        bottom - bottom pixel
      • ImageRectangleF

        public ImageRectangleF​(ImageRectangleF rectangle)
        Constructor
        Parameters:
        rectangle - image rectangle
        Since:
        1.2.0
      • ImageRectangleF

        public ImageRectangleF​(ImageRectangle rectangle)
        Constructor
        Parameters:
        rectangle - image rectangle
        Since:
        1.2.0
    • Method Detail

      • getLeft

        public float getLeft()
        Get the left
        Returns:
        left
      • getRight

        public float getRight()
        Get the right
        Returns:
        right
      • getTop

        public float getTop()
        Get the top
        Returns:
        top
      • getBottom

        public float getBottom()
        Get the bottom
        Returns:
        bottom
      • round

        public ImageRectangle round()
        Round the floating point rectangle to an integer rectangle
        Returns:
        image rectangle
      • isValid

        public boolean isValid()
        Check if the rectangle is valid
        Returns:
        true if valid
      • isValidAllowEmpty

        public boolean isValidAllowEmpty()
        Check if the rectangle is valid allowing empty ranges
        Returns:
        valid
        Since:
        1.2.1
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object