Package limn.graphics
Record Class ShapedText.Run
java.lang.Object
java.lang.Record
limn.graphics.ShapedText.Run
- Record Components:
faceId- the producing ruler's identifier for the face; opaque above that rulercharStart- first char offset of the text this run coverscharEnd- one past the lastglyphStart- first glyph index of this runglyphEnd- one past the lastlevel- the bidi embedding level; even reads left to right
- Enclosing class:
ShapedText
public static record ShapedText.Run(int faceId, int charStart, int charEnd, int glyphStart, int glyphEnd, int level)
extends Record
One shaped stretch: a single face, a single embedding level, a single shaping call, and the
unit the backend resolves a face at and batches a draw at.
-
Constructor Summary
ConstructorsConstructorDescriptionRun(int faceId, int charStart, int charEnd, int glyphStart, int glyphEnd, int level) Creates an instance of aRunrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcharEnd()Returns the value of thecharEndrecord component.intReturns the value of thecharStartrecord component.final booleanIndicates whether some other object is "equal to" this one.intfaceId()Returns the value of thefaceIdrecord component.intglyphEnd()Returns the value of theglyphEndrecord component.intReturns the value of theglyphStartrecord component.final inthashCode()Returns a hash code value for this object.intlevel()Returns the value of thelevelrecord component.booleanrtl()Whether the characters run right to left inside this run's own box: the level's parity, derived rather than carried, so no field can contradict another.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Run
public Run(int faceId, int charStart, int charEnd, int glyphStart, int glyphEnd, int level) Creates an instance of aRunrecord class.- Parameters:
faceId- the value for thefaceIdrecord componentcharStart- the value for thecharStartrecord componentcharEnd- the value for thecharEndrecord componentglyphStart- the value for theglyphStartrecord componentglyphEnd- the value for theglyphEndrecord componentlevel- the value for thelevelrecord component
-
-
Method Details
-
rtl
public boolean rtl()Whether the characters run right to left inside this run's own box: the level's parity, derived rather than carried, so no field can contradict another. -
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 '=='. -
faceId
public int faceId()Returns the value of thefaceIdrecord component.- Returns:
- the value of the
faceIdrecord component
-
charStart
public int charStart()Returns the value of thecharStartrecord component.- Returns:
- the value of the
charStartrecord component
-
charEnd
public int charEnd()Returns the value of thecharEndrecord component.- Returns:
- the value of the
charEndrecord component
-
glyphStart
public int glyphStart()Returns the value of theglyphStartrecord component.- Returns:
- the value of the
glyphStartrecord component
-
glyphEnd
public int glyphEnd()Returns the value of theglyphEndrecord component.- Returns:
- the value of the
glyphEndrecord component
-
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-