- java.lang.Object
-
- io.github.humbleui.types.IRect
-
public class IRect extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IRect(int l, int t, int r, int b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleancontains(int x, int y)booleancontains(@NotNull IPoint vec)booleanequals(java.lang.Object o)intgetBottom()intgetHeight()intgetLeft()intgetRight()intgetTop()intgetWidth()inthashCode()@Nullable IRectintersect(@NotNull IRect other)booleanisEmpty()static @NotNull IRectmakeLTRB(int l, int t, int r, int b)static @NotNull IRectmakeWH(int w, int h)static @NotNull IRectmakeXYWH(int l, int t, int w, int h)@NotNull IRectoffset(int dx, int dy)@NotNull IRectoffset(@NotNull IPoint vec)@NotNull IRectscale(int scale)@NotNull IRectscale(int sx, int sy)@NotNull RecttoRect()java.lang.StringtoString()IRectwithBottom(int _bottom)@NotNull IRectwithHeight(int height)IRectwithLeft(int _left)IRectwithRight(int _right)IRectwithTop(int _top)@NotNull IRectwithWidth(int width)
-
-
-
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)
-
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)
-
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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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.
-
-