Record Class GuiTextHit
java.lang.Object
java.lang.Record
com.render.api.gui.GuiTextHit
- Record Components:
utf16Offset- source UTF-16 offset clamped to a grapheme boundarytrailing- whether the hit selected the visual trailing edgeinsideInk- whether the pointer was inside the layout's ink boundslineIndex- zero-based visual line index
public record GuiTextHit(int utf16Offset, boolean trailing, boolean insideInk, int lineIndex)
extends Record
Result of shaped text hit testing.
-
Constructor Summary
ConstructorsConstructorDescriptionGuiTextHit(int utf16Offset, boolean trailing, boolean insideInk, int lineIndex) Creates an instance of aGuiTextHitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinsideInkrecord component.intReturns the value of thelineIndexrecord component.final StringtoString()Returns a string representation of this record class.booleantrailing()Returns the value of thetrailingrecord component.intReturns the value of theutf16Offsetrecord component.
-
Constructor Details
-
GuiTextHit
public GuiTextHit(int utf16Offset, boolean trailing, boolean insideInk, int lineIndex) Creates an instance of aGuiTextHitrecord class.- Parameters:
utf16Offset- the value for theutf16Offsetrecord componenttrailing- the value for thetrailingrecord componentinsideInk- the value for theinsideInkrecord componentlineIndex- the value for thelineIndexrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
utf16Offset
public int utf16Offset()Returns the value of theutf16Offsetrecord component.- Returns:
- the value of the
utf16Offsetrecord component
-
trailing
-
insideInk
-
lineIndex
-