Record Class GuiTextPaint.Gradient
java.lang.Object
java.lang.Record
com.render.api.gui.GuiTextPaint.Gradient
- Record Components:
type- linear, radial, or conic gradientstops- ordered color stopsangleDegrees- gradient angle in degreescenterX- normalized horizontal centercenterY- normalized vertical centerradius- radial reach relative to the farthest cornerrepeating- whether progress repeats outside the unit intervalresolution- 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 Summary
ConstructorsConstructorDescriptionGradient(GuiGradient.Type type, List<GuiGradient.Stop> stops, float angleDegrees, float centerX, float centerY, float radius, boolean repeating, int resolution) Creates an instance of aGradientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theangleDegreesrecord component.floatcenterX()Returns the value of thecenterXrecord component.floatcenterY()Returns the value of thecenterYrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatradius()Returns the value of theradiusrecord component.booleanReturns the value of therepeatingrecord component.intReturns the value of theresolutionrecord component.stops()Returns the value of thestopsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
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 aGradientrecord class.- Parameters:
type- the value for thetyperecord componentstops- the value for thestopsrecord componentangleDegrees- the value for theangleDegreesrecord componentcenterX- the value for thecenterXrecord componentcenterY- the value for thecenterYrecord componentradius- the value for theradiusrecord componentrepeating- the value for therepeatingrecord componentresolution- the value for theresolutionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
-
stops
-
angleDegrees
public float angleDegrees()Returns the value of theangleDegreesrecord component.- Returns:
- the value of the
angleDegreesrecord component
-
centerX
-
centerY
-
radius
-
repeating
-
resolution
public int resolution()Returns the value of theresolutionrecord component.- Returns:
- the value of the
resolutionrecord component
-