Package guideme.document
Record Class LytRect
java.lang.Object
java.lang.Record
guideme.document.LytRect
-
Constructor Summary
ConstructorsConstructorDescriptionLytRect(int x, int y, int width, int height) Creates an instance of aLytRectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbottom()centerHorizontallyIn(LytRect other) centerVerticallyIn(LytRect other) booleancontains(int x, int y) booleanstatic LytRectempty()final booleanIndicates whether some other object is "equal to" this one.expand(int amount) expand(int left, int top, int right, int bottom) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanintersects(LytRect other) booleanisEmpty()move(int x, int y) org.joml.Vector2ipoint()intright()shrink(int left, int top, int right, int bottom) size()net.minecraft.client.gui.navigation.ScreenRectanglefinal StringtoString()Returns a string representation of this record class.transform(org.joml.Matrix3x2fc pose) static LytRectintwidth()Returns the value of thewidthrecord component.withHeight(int height) withWidth(int width) withX(int x) withY(int y) intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
LytRect
public LytRect(int x, int y, int width, int height) Creates an instance of aLytRectrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
empty
-
right
public int right() -
bottom
public int bottom() -
isEmpty
public boolean isEmpty() -
shrink
-
expand
-
expand
-
withWidth
-
withHeight
-
move
-
centerIn
-
centerHorizontallyIn
-
centerVerticallyIn
-
union
-
contains
-
contains
public boolean contains(int x, int y) -
intersects
-
withX
-
withY
-
transform
-
size
-
point
public org.joml.Vector2i point() -
toScreenRectangle
public net.minecraft.client.gui.navigation.ScreenRectangle toScreenRectangle() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-