Record Class GuiTextPaint.Gradient

java.lang.Object
java.lang.Record
com.render.api.gui.GuiTextPaint.Gradient
Record Components:
type - linear, radial, or conic gradient
stops - ordered color stops
angleDegrees - gradient angle in degrees
centerX - normalized horizontal center
centerY - normalized vertical center
radius - radial reach relative to the farthest corner
repeating - whether progress repeats outside the unit interval
resolution - lookup texture quality
Enclosing class:
GuiTextPaint

public static record GuiTextPaint.Gradient(GuiGradient.Type type, List<GuiGradient.Stop> stops, float angleDegrees, float centerX, float centerY, float radius, boolean repeating, int resolution) extends Record
Immutable gradient snapshot used by text runs.
  • Constructor Details

    • Gradient

      public Gradient(GuiGradient.Type type, List<GuiGradient.Stop> stops, float angleDegrees, float centerX, float centerY, float radius, boolean repeating, int resolution)
      Creates an instance of a Gradient record class.
      Parameters:
      type - the value for the type record component
      stops - the value for the stops record component
      angleDegrees - the value for the angleDegrees record component
      centerX - the value for the centerX record component
      centerY - the value for the centerY record component
      radius - the value for the radius record component
      repeating - the value for the repeating record component
      resolution - the value for the resolution record component
  • Method Details

    • 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.
    • type

      public GuiGradient.Type type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • stops

      public List<GuiGradient.Stop> stops()
      Returns the value of the stops record component.
      Returns:
      the value of the stops record component
    • angleDegrees

      public float angleDegrees()
      Returns the value of the angleDegrees record component.
      Returns:
      the value of the angleDegrees record component
    • centerX

      public float centerX()
      Returns the value of the centerX record component.
      Returns:
      the value of the centerX record component
    • centerY

      public float centerY()
      Returns the value of the centerY record component.
      Returns:
      the value of the centerY record component
    • radius

      public float radius()
      Returns the value of the radius record component.
      Returns:
      the value of the radius record component
    • repeating

      public boolean repeating()
      Returns the value of the repeating record component.
      Returns:
      the value of the repeating record component
    • resolution

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