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 qualityinterpolationSpace- color interpolation spacehueDirection- direction of polar hue interpolationsteps- 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 Summary
ConstructorsConstructorDescriptionGradient(GuiGradient.Type type, List<GuiGradient.Stop> stops, float angleDegrees, float centerX, float centerY, float radius, boolean repeating, int resolution) 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) 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.Returns the value of thehueDirectionrecord component.Returns the value of theinterpolationSpacerecord component.floatradius()Returns the value of theradiusrecord component.booleanReturns the value of therepeatingrecord component.intReturns the value of theresolutionrecord component.steps()Returns the value of thestepsrecord 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) -
Gradient
public 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) 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 componentinterpolationSpace- the value for theinterpolationSpacerecord componenthueDirection- the value for thehueDirectionrecord componentsteps- the value for thestepsrecord 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
-
interpolationSpace
Returns the value of theinterpolationSpacerecord component.- Returns:
- the value of the
interpolationSpacerecord component
-
hueDirection
Returns the value of thehueDirectionrecord component.- Returns:
- the value of the
hueDirectionrecord component
-
steps
-