Record Class MsdfFont.Glyph

java.lang.Object
java.lang.Record
lol.trq.helios.text.MsdfFont.Glyph
Record Components:
codepoint - the character
advance - horizontal advance
left - quad left, from the pen position
top - quad top, from the baseline (negative is above)
right - quad right
bottom - quad bottom
u0 - atlas left in texture coordinates
v0 - atlas top
u1 - atlas right
v1 - atlas bottom
Enclosing class:
MsdfFont

public static record MsdfFont.Glyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1) extends Record
One glyph.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Glyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1)
    Creates an instance of a Glyph record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Returns the value of the advance record component.
    float
    Returns the value of the bottom record component.
    int
    Returns the value of the codepoint record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the left record component.
    float
    Returns the value of the right record component.
    float
    top()
    Returns the value of the top record component.
    final String
    Returns a string representation of this record class.
    float
    u0()
    Returns the value of the u0 record component.
    float
    u1()
    Returns the value of the u1 record component.
    float
    v0()
    Returns the value of the v0 record component.
    float
    v1()
    Returns the value of the v1 record component.
    boolean
    Returns whether the glyph has anything to draw.

    Methods inherited from class Object

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

    • Glyph

      public Glyph(int codepoint, float advance, float left, float top, float right, float bottom, float u0, float v0, float u1, float v1)
      Creates an instance of a Glyph record class.
      Parameters:
      codepoint - the value for the codepoint record component
      advance - the value for the advance record component
      left - the value for the left record component
      top - the value for the top record component
      right - the value for the right record component
      bottom - the value for the bottom record component
      u0 - the value for the u0 record component
      v0 - the value for the v0 record component
      u1 - the value for the u1 record component
      v1 - the value for the v1 record component
  • Method Details

    • visible

      public boolean visible()
      Returns whether the glyph has anything to draw.
      Returns:
      false for spaces
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • codepoint

      public int codepoint()
      Returns the value of the codepoint record component.
      Returns:
      the value of the codepoint record component
    • advance

      public float advance()
      Returns the value of the advance record component.
      Returns:
      the value of the advance record component
    • left

      public float left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • top

      public float top()
      Returns the value of the top record component.
      Returns:
      the value of the top record component
    • right

      public float right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component
    • bottom

      public float bottom()
      Returns the value of the bottom record component.
      Returns:
      the value of the bottom record component
    • u0

      public float u0()
      Returns the value of the u0 record component.
      Returns:
      the value of the u0 record component
    • v0

      public float v0()
      Returns the value of the v0 record component.
      Returns:
      the value of the v0 record component
    • u1

      public float u1()
      Returns the value of the u1 record component.
      Returns:
      the value of the u1 record component
    • v1

      public float v1()
      Returns the value of the v1 record component.
      Returns:
      the value of the v1 record component