Package org.polyfrost.polyui.color
Class Color.Gradient
-
- All Implemented Interfaces:
-
kotlin.Cloneable
public final class Color.Gradient extends Color.Animated
A gradient color.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classColor.Gradient.Type
-
Field Summary
Fields Modifier and Type Field Description private final Color.Animatedcolor1private final Integerargb1private final Integerargb2private final Color.Gradient.Typetypeprivate final BooleanalwaysUpdatesprivate final Booleanupdatingprivate Floathueprivate Floatsaturationprivate Floatbrightnessprivate Floatalphaprivate transient Booleandirtyprivate transient Integerargbprivate final Integerrprivate final Integergprivate final Integerbprivate final Integera
-
Constructor Summary
Constructors Constructor Description Color.Gradient(Color color1, Color color2, Color.Gradient.Type type)Color.Gradient(Color color1, Color color2)
-
Method Summary
Modifier and Type Method Description final Color.AnimatedgetColor1()final IntegergetARGB1()final IntegergetARGB2()final Color.Gradient.TypegetType()Booleanequals(Object other)final Colorget(Integer index)final Unitset(Integer index, Color color)IntegerhashCode()Color.Gradientclone()final Unitrecolor(Integer whichColor, Color target, Animation.Type type, Long durationNanos)Animated.recolor this gradient color. Unitrecolor(Color target, Animation.Type type, Long durationNanos)Deprecated, see Component.recolor for how to animate gradients. Booleanupdate(Long deltaTimeNanos)update the color animation, if present. -
Methods inherited from class org.polyfrost.polyui.color.Color.Animated
getAlwaysUpdates, getUpdating, toAnimatable -
Methods inherited from class org.polyfrost.polyui.color.Color
getA, getARGB, getAlpha, getB, getBrightness, getDirty, getG, getHue, getR, getSaturation, setAlpha, setArgb, setBrightness, setDirty, setHue, setSaturation, take, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Color.Gradient
Color.Gradient(Color color1, Color color2, Color.Gradient.Type type)
-
-
Method Detail
-
getColor1
final Color.Animated getColor1()
-
getType
final Color.Gradient.Type getType()
-
clone
Color.Gradient clone()
-
recolor
final Unit recolor(Integer whichColor, Color target, Animation.Type type, Long durationNanos)
Animated.recolor this gradient color.
- Parameters:
whichColor- which color to recolor.
-
recolor
@Deprecated(message = "Gradient colors cannot be animated in this way. They can be animated separately using the given method.", replaceWith = @ReplaceWith(imports = {}, expression = "recolor(0, target, type, durationNanos)"), level = DeprecationLevel.ERROR) Unit recolor(Color target, Animation.Type type, Long durationNanos)
Deprecated, see Component.recolor for how to animate gradients.
- Parameters:
type- animation type.
-
-
-
-