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 ruler
charStart - first char offset of the text this run covers
charEnd - one past the last
glyphStart - first glyph index of this run
glyphEnd - one past the last
level - 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

    Constructors
    Constructor
    Description
    Run(int faceId, int charStart, int charEnd, int glyphStart, int glyphEnd, int level)
    Creates an instance of a Run record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the charEnd record component.
    int
    Returns the value of the charStart record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the faceId record component.
    int
    Returns the value of the glyphEnd record component.
    int
    Returns the value of the glyphStart record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the level record component.
    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.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Run

      public Run(int faceId, int charStart, int charEnd, int glyphStart, int glyphEnd, int level)
      Creates an instance of a Run record class.
      Parameters:
      faceId - the value for the faceId record component
      charStart - the value for the charStart record component
      charEnd - the value for the charEnd record component
      glyphStart - the value for the glyphStart record component
      glyphEnd - the value for the glyphEnd record component
      level - the value for the level record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • faceId

      public int faceId()
      Returns the value of the faceId record component.
      Returns:
      the value of the faceId record component
    • charStart

      public int charStart()
      Returns the value of the charStart record component.
      Returns:
      the value of the charStart record component
    • charEnd

      public int charEnd()
      Returns the value of the charEnd record component.
      Returns:
      the value of the charEnd record component
    • glyphStart

      public int glyphStart()
      Returns the value of the glyphStart record component.
      Returns:
      the value of the glyphStart record component
    • glyphEnd

      public int glyphEnd()
      Returns the value of the glyphEnd record component.
      Returns:
      the value of the glyphEnd record component
    • level

      public int level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component