- 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.Colorcurrentprivate longcurrentTimestampprivate @NotNull ColorValueinitialprivate @NotNull Tracktrackprivate @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.ColorcomputeCurrent(@NotNull MeasureContext context, long timestamp)private @NotNull java.awt.Colorcurrent(@NotNull MeasureContext context)@NotNull AnimatedColorderive(@NotNull SVGPaint value)voiddrawShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)voidfillShape(@NotNull Output output, @NotNull RenderContext context, @NotNull java.awt.Shape shape, @Nullable java.awt.geom.Rectangle2D bounds)@NotNull java.awt.Colorget(@NotNull MeasureContext context)booleanisVisible(@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:
getin 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)
-
-