Class ImageRectangle


  • public class ImageRectangle
    extends Object
    Tile image rectangle with integer dimensions
    Author:
    osbornb
    • Constructor Detail

      • ImageRectangle

        public ImageRectangle​(int left,
                              int top,
                              int right,
                              int bottom)
        Constructor
        Parameters:
        left - left pixel
        top - top pixel
        right - right pixel
        bottom - bottom pixel
      • ImageRectangle

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

      • getLeft

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

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

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

        public int getBottom()
        Get the bottom
        Returns:
        bottom
      • 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