Record Class GuiGradient.ColorStop
java.lang.Object
java.lang.Record
com.render.api.gui.GuiGradient.ColorStop
- Record Components:
position- first stop positionsecondPosition- optional second stop positioncolor- stop color
- All Implemented Interfaces:
GuiGradient.Step
- Enclosing class:
GuiGradient
public static record GuiGradient.ColorStop(GuiGradient.Position position, GuiGradient.Position secondPosition, RenderColor color)
extends Record
implements GuiGradient.Step
A color stop with an optional second position. A second position expands to the CSS
double-position form while retaining one logical color stop.
-
Constructor Summary
ConstructorsConstructorDescriptionColorStop(GuiGradient.Position position, GuiGradient.Position secondPosition, RenderColor color) Creates an instance of aColorStoprecord class.ColorStop(GuiGradient.Position position, RenderColor color) -
Method Summary
Modifier and TypeMethodDescriptionstatic GuiGradient.ColorStopbetween(GuiGradient.Position first, GuiGradient.Position second, RenderColor color) color()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.position()Returns the value of thepositionrecord component.Returns the value of thesecondPositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ColorStop
public ColorStop(GuiGradient.Position position, GuiGradient.Position secondPosition, RenderColor color) Creates an instance of aColorStoprecord class.- Parameters:
position- the value for thepositionrecord componentsecondPosition- the value for thesecondPositionrecord componentcolor- the value for thecolorrecord component
-
ColorStop
-
-
Method Details
-
between
public static GuiGradient.ColorStop between(GuiGradient.Position first, GuiGradient.Position second, RenderColor color) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
position
-
secondPosition
Returns the value of thesecondPositionrecord component.- Returns:
- the value of the
secondPositionrecord component
-
color
-