public class AnimatablePaintValue extends AnimatableColorValue
Modifier and Type | Field and Description |
---|---|
static int |
PAINT_COLOR |
static int |
PAINT_CURRENT_COLOR |
static int |
PAINT_INHERIT |
static int |
PAINT_NONE |
static int |
PAINT_URI |
static int |
PAINT_URI_COLOR |
static int |
PAINT_URI_CURRENT_COLOR |
static int |
PAINT_URI_NONE |
protected int |
paintType
The type of paint.
|
protected java.lang.String |
uri
The URI of the referenced paint server.
|
blue, green, red
decimalFormat, hasChanged, target
Modifier | Constructor and Description |
---|---|
protected |
AnimatablePaintValue(AnimationTarget target)
Creates a new, uninitialized AnimatablePaintValue.
|
protected |
AnimatablePaintValue(AnimationTarget target,
float r,
float g,
float b)
Creates a new AnimatablePaintValue.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canPace()
Returns whether two values of this type can have their distance
computed, as needed by paced animation.
|
static AnimatablePaintValue |
createColorPaintValue(AnimationTarget target,
float r,
float g,
float b)
Creates a new AnimatablePaintValue for a color value.
|
static AnimatablePaintValue |
createCurrentColorPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'currentColor' value.
|
static AnimatablePaintValue |
createInheritPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'inherit' value.
|
static AnimatablePaintValue |
createNonePaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'none' value.
|
static AnimatablePaintValue |
createURIColorPaintValue(AnimationTarget target,
java.lang.String uri,
float r,
float g,
float b)
Creates a new AnimatablePaintValue for a URI reference with a
color fallback.
|
static AnimatablePaintValue |
createURICurrentColorPaintValue(AnimationTarget target,
java.lang.String uri)
Creates a new AnimatablePaintValue for a URI reference with a
'currentColor' fallback.
|
static AnimatablePaintValue |
createURINonePaintValue(AnimationTarget target,
java.lang.String uri)
Creates a new AnimatablePaintValue for a URI reference with a
'none' fallback.
|
static AnimatablePaintValue |
createURIPaintValue(AnimationTarget target,
java.lang.String uri)
Creates a new AnimatablePaintValue for a URI reference.
|
float |
distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other
value.
|
java.lang.String |
getCssText()
Returns the CSS text representation of the value.
|
int |
getPaintType()
Returns the type of paint this value represents.
|
java.lang.String |
getURI()
Returns the paint server URI.
|
AnimatableValue |
getZeroValue()
Returns a zero value of this AnimatableValue's type.
|
AnimatableValue |
interpolate(AnimatableValue result,
AnimatableValue to,
float interpolation,
AnimatableValue accumulation,
int multiplier)
Performs interpolation to the given value.
|
formatNumber, hasChanged, toString, toStringRep
public static final int PAINT_NONE
public static final int PAINT_CURRENT_COLOR
public static final int PAINT_COLOR
public static final int PAINT_URI
public static final int PAINT_URI_NONE
public static final int PAINT_URI_CURRENT_COLOR
public static final int PAINT_URI_COLOR
public static final int PAINT_INHERIT
protected int paintType
protected java.lang.String uri
protected AnimatablePaintValue(AnimationTarget target)
protected AnimatablePaintValue(AnimationTarget target, float r, float g, float b)
public static AnimatablePaintValue createNonePaintValue(AnimationTarget target)
public static AnimatablePaintValue createCurrentColorPaintValue(AnimationTarget target)
public static AnimatablePaintValue createColorPaintValue(AnimationTarget target, float r, float g, float b)
public static AnimatablePaintValue createURIPaintValue(AnimationTarget target, java.lang.String uri)
public static AnimatablePaintValue createURINonePaintValue(AnimationTarget target, java.lang.String uri)
public static AnimatablePaintValue createURICurrentColorPaintValue(AnimationTarget target, java.lang.String uri)
public static AnimatablePaintValue createURIColorPaintValue(AnimationTarget target, java.lang.String uri, float r, float g, float b)
public static AnimatablePaintValue createInheritPaintValue(AnimationTarget target)
public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
interpolate
in class AnimatableColorValue
result
- the object in which to store the result of the
interpolation, or null if a new object should be createdto
- the value this value should be interpolated towards, or null
if no actual interpolation should be performedinterpolation
- the interpolation distance, 0 <= interpolation
<= 1accumulation
- an accumulation to add to the interpolated valuemultiplier
- an amount the accumulation values should be multiplied
by before being added to the interpolated valuepublic int getPaintType()
public java.lang.String getURI()
public boolean canPace()
canPace
in class AnimatableColorValue
public float distanceTo(AnimatableValue other)
distanceTo
in class AnimatableColorValue
public AnimatableValue getZeroValue()
getZeroValue
in class AnimatableColorValue
public java.lang.String getCssText()
getCssText
in class AnimatableColorValue
Copyright © 2022 Apache Software Foundation. All Rights Reserved.