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
interpolationSpace - color interpolation space
hueDirection - direction of polar hue interpolation
steps - typed stops and hints, including length positions
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, GuiGradient.InterpolationSpace interpolationSpace, GuiGradient.HueDirection hueDirection, List<GuiGradient.Step> steps) extends Record
Immutable gradient snapshot used by text runs.
  • Constructor Details

  • 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
    • interpolationSpace

      public GuiGradient.InterpolationSpace interpolationSpace()
      Returns the value of the interpolationSpace record component.
      Returns:
      the value of the interpolationSpace record component
    • hueDirection

      public GuiGradient.HueDirection hueDirection()
      Returns the value of the hueDirection record component.
      Returns:
      the value of the hueDirection record component
    • steps

      public List<GuiGradient.Step> steps()
      Returns the value of the steps record component.
      Returns:
      the value of the steps record component