- java.lang.Object
-
- com.github.weisj.jsvg.animation.value.AnimatedColor
-
- All Implemented Interfaces:
ColorValue
,SVGPaint
public final class AnimatedColor extends java.lang.Object implements SVGPaint, ColorValue
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Color
current
private long
currentTimestamp
private @NotNull ColorValue
initial
private @NotNull Track
track
private @NotNull RGBColor @NotNull []
values
-
Constructor Summary
Constructors Constructor Description AnimatedColor(@NotNull Track track, @NotNull ColorValue initial, @NotNull RGBColor @NotNull [] values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private @NotNull java.awt.Color
computeCurrent(@NotNull MeasureContext context, long timestamp)
private @NotNull java.awt.Color
current(@NotNull MeasureContext context)
@NotNull AnimatedColor
derive(@NotNull SVGPaint value)
void
drawShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)
void
fillShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)
@NotNull java.awt.Color
get(@NotNull MeasureContext context)
boolean
isVisible(@NotNull RenderContext context)
-
-
-
Field Detail
-
track
@NotNull private final @NotNull Track track
-
initial
@NotNull private final @NotNull ColorValue initial
-
values
@NotNull private final @NotNull RGBColor @NotNull [] values
-
current
private java.awt.Color current
-
currentTimestamp
private long currentTimestamp
-
-
Constructor Detail
-
AnimatedColor
public AnimatedColor(@NotNull @NotNull Track track, @NotNull @NotNull ColorValue initial, @NotNull @NotNull RGBColor @NotNull [] values)
-
-
Method Detail
-
derive
@NotNull public @NotNull AnimatedColor derive(@NotNull @NotNull SVGPaint value)
-
get
@NotNull public @NotNull java.awt.Color get(@NotNull @NotNull MeasureContext context)
- Specified by:
get
in interfaceColorValue
-
current
@NotNull private @NotNull java.awt.Color current(@NotNull @NotNull MeasureContext context)
-
computeCurrent
@NotNull private @NotNull java.awt.Color computeCurrent(@NotNull @NotNull MeasureContext context, long timestamp)
-
fillShape
public void fillShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.Shape shape, @Nullable @Nullable java.awt.geom.Rectangle2D bounds)
-
drawShape
public void drawShape(@NotNull @NotNull Output output, @NotNull @NotNull RenderContext context, @NotNull @NotNull java.awt.Shape shape, @Nullable @Nullable java.awt.geom.Rectangle2D bounds)
-
isVisible
public boolean isVisible(@NotNull @NotNull RenderContext context)
-
-