Class IRect


  • public class IRect
    extends java.lang.Object
    • Field Detail

      • _left

        public final int _left
      • _top

        public final int _top
      • _right

        public final int _right
      • _bottom

        public final int _bottom
    • Constructor Detail

      • IRect

        @Internal
        public IRect​(int l,
                     int t,
                     int r,
                     int b)
    • Method Detail

      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • withWidth

        @NotNull
        @Contract("_ -> new")
        public @NotNull IRect withWidth​(int width)
      • withHeight

        @NotNull
        @Contract("_ -> new")
        public @NotNull IRect withHeight​(int height)
      • makeLTRB

        @NotNull
        @Contract("_, _, _, _ -> new")
        public static @NotNull IRect makeLTRB​(int l,
                                              int t,
                                              int r,
                                              int b)
      • makeXYWH

        @NotNull
        @Contract("_, _, _, _ -> new")
        public static @NotNull IRect makeXYWH​(int l,
                                              int t,
                                              int w,
                                              int h)
      • makeWH

        @NotNull
        @Contract("_, _ -> new")
        public static @NotNull IRect makeWH​(int w,
                                            int h)
      • intersect

        @Nullable
        public @Nullable IRect intersect​(@NotNull
                                         @NotNull IRect other)
      • scale

        @NotNull
        public @NotNull IRect scale​(int scale)
      • scale

        @NotNull
        public @NotNull IRect scale​(int sx,
                                    int sy)
      • offset

        @NotNull
        public @NotNull IRect offset​(int dx,
                                     int dy)
      • offset

        @NotNull
        public @NotNull IRect offset​(@NotNull
                                     @NotNull IPoint vec)
      • toRect

        @NotNull
        @Contract("-> new")
        public @NotNull Rect toRect()
      • isEmpty

        public boolean isEmpty()
      • contains

        public boolean contains​(int x,
                                int y)
      • contains

        public boolean contains​(@NotNull
                                @NotNull IPoint vec)
      • getLeft

        public int getLeft()
      • getTop

        public int getTop()
      • getRight

        public int getRight()
      • getBottom

        public int getBottom()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • withLeft

        public IRect withLeft​(int _left)
        Returns:
        this.
      • withTop

        public IRect withTop​(int _top)
        Returns:
        this.
      • withRight

        public IRect withRight​(int _right)
        Returns:
        this.
      • withBottom

        public IRect withBottom​(int _bottom)
        Returns:
        this.