- java.lang.Object
-
- io.github.humbleui.types.Rect
-
- Direct Known Subclasses:
RRect
public class Rect extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Rect(float l, float t, float r, float b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)floatgetBottom()floatgetHeight()floatgetLeft()floatgetRight()floatgetTop()floatgetWidth()inthashCode()@NotNull Rectinflate(float spread)@Nullable Rectintersect(@NotNull Rect other)booleanisEmpty()static @NotNull RectmakeLTRB(float l, float t, float r, float b)static @NotNull RectmakeWH(float w, float h)static @NotNull RectmakeWH(@NotNull Point size)static @NotNull RectmakeXYWH(float l, float t, float w, float h)@NotNull Rectoffset(float dx, float dy)@NotNull Rectoffset(@NotNull Point vec)@NotNull Rectscale(float scale)@NotNull Rectscale(float sx, float sy)@NotNull IRecttoIRect()java.lang.StringtoString()RectwithBottom(float _bottom)@NotNull RectwithHeight(float height)RectwithLeft(float _left)@NotNull RRectwithRadii(float radius)@NotNull RRectwithRadii(float[] radii)@NotNull RRectwithRadii(float xRad, float yRad)@NotNull RRectwithRadii(float tlRad, float trRad, float brRad, float blRad)RectwithRight(float _right)RectwithTop(float _top)@NotNull RectwithWidth(float width)
-
-
-
Method Detail
-
getWidth
public float getWidth()
-
getHeight
public float getHeight()
-
withWidth
@NotNull @Contract("_ -> new") public @NotNull Rect withWidth(float width)
-
withHeight
@NotNull @Contract("_ -> new") public @NotNull Rect withHeight(float height)
-
makeLTRB
@NotNull @Contract("_, _, _, _ -> new") public static @NotNull Rect makeLTRB(float l, float t, float r, float b)
-
makeWH
@NotNull @Contract("_, _ -> new") public static @NotNull Rect makeWH(float w, float h)
-
makeWH
@NotNull @Contract("_, _ -> new") public static @NotNull Rect makeWH(@NotNull @NotNull Point size)
-
makeXYWH
@NotNull @Contract("_, _, _, _ -> new") public static @NotNull Rect makeXYWH(float l, float t, float w, float h)
-
scale
@NotNull public @NotNull Rect scale(float scale)
-
scale
@NotNull public @NotNull Rect scale(float sx, float sy)
-
offset
@NotNull public @NotNull Rect offset(float dx, float dy)
-
toIRect
@NotNull @Contract("-> new") public @NotNull IRect toIRect()
-
withRadii
@NotNull @Contract("_ -> new") public @NotNull RRect withRadii(float radius)
-
withRadii
@NotNull @Contract("_, _ -> new") public @NotNull RRect withRadii(float xRad, float yRad)
-
withRadii
@NotNull @Contract("_ -> new") public @NotNull RRect withRadii(float tlRad, float trRad, float brRad, float blRad)
-
withRadii
@NotNull @Contract("_ -> new") public @NotNull RRect withRadii(float[] radii)
-
inflate
@NotNull public @NotNull Rect inflate(float spread)
-
isEmpty
public boolean isEmpty()
-
getLeft
public float getLeft()
-
getTop
public float getTop()
-
getRight
public float getRight()
-
getBottom
public float 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 Rect withLeft(float _left)
- Returns:
this.
-
withTop
public Rect withTop(float _top)
- Returns:
this.
-
withRight
public Rect withRight(float _right)
- Returns:
this.
-
withBottom
public Rect withBottom(float _bottom)
- Returns:
this.
-
-