Record Class GuiTextDecoration

java.lang.Object
java.lang.Record
com.render.api.gui.GuiTextDecoration
Record Components:
lines - decorated line positions
style - solid, double, dotted, dashed, or wavy geometry
paint - decoration paint
thickness - explicit thickness, or Float.NaN for automatic
offset - baseline-relative offset in logical pixels
skipInk - whether the line should avoid glyph coverage

public record GuiTextDecoration(Set<GuiTextDecoration.Line> lines, GuiTextDecoration.Style style, GuiTextPaint paint, float thickness, float offset, boolean skipInk) extends Record
CSS-style underline, overline, and line-through configuration.
  • Constructor Details

    • GuiTextDecoration

      public GuiTextDecoration(Set<GuiTextDecoration.Line> lines, GuiTextDecoration.Style style, GuiTextPaint paint, float thickness, float offset, boolean skipInk)
      Creates an instance of a GuiTextDecoration record class.
      Parameters:
      lines - the value for the lines record component
      style - the value for the style record component
      paint - the value for the paint record component
      thickness - the value for the thickness record component
      offset - the value for the offset record component
      skipInk - the value for the skipInk record component
  • Method Details

    • underline

      public static GuiTextDecoration underline(GuiTextPaint paint)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • lines

      public Set<GuiTextDecoration.Line> lines()
      Returns the value of the lines record component.
      Returns:
      the value of the lines record component
    • style

      public GuiTextDecoration.Style style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • paint

      public GuiTextPaint paint()
      Returns the value of the paint record component.
      Returns:
      the value of the paint record component
    • thickness

      public float thickness()
      Returns the value of the thickness record component.
      Returns:
      the value of the thickness record component
    • offset

      public float offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • skipInk

      public boolean skipInk()
      Returns the value of the skipInk record component.
      Returns:
      the value of the skipInk record component