Class AnimatablePaintValue
java.lang.Object
org.apache.batik.anim.values.AnimatableValue
org.apache.batik.anim.values.AnimatableColorValue
org.apache.batik.anim.values.AnimatablePaintValue
An SVG paint value in the animation system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intThe type of paint.protected StringThe URI of the referenced paint server.Fields inherited from class AnimatableColorValue
blue, green, redFields inherited from class AnimatableValue
decimalFormat, hasChanged, target -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAnimatablePaintValue(AnimationTarget target) Creates a new, uninitialized AnimatablePaintValue.protectedAnimatablePaintValue(AnimationTarget target, float r, float g, float b) Creates a new AnimatablePaintValue. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPace()Returns whether two values of this type can have their distance computed, as needed by paced animation.static AnimatablePaintValuecreateColorPaintValue(AnimationTarget target, float r, float g, float b) Creates a new AnimatablePaintValue for a color value.static AnimatablePaintValueCreates a new AnimatablePaintValue for a 'currentColor' value.static AnimatablePaintValueCreates a new AnimatablePaintValue for a 'inherit' value.static AnimatablePaintValuecreateNonePaintValue(AnimationTarget target) Creates a new AnimatablePaintValue for a 'none' value.static AnimatablePaintValuecreateURIColorPaintValue(AnimationTarget target, String uri, float r, float g, float b) Creates a new AnimatablePaintValue for a URI reference with a color fallback.static AnimatablePaintValuecreateURICurrentColorPaintValue(AnimationTarget target, String uri) Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.static AnimatablePaintValuecreateURINonePaintValue(AnimationTarget target, String uri) Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback.static AnimatablePaintValuecreateURIPaintValue(AnimationTarget target, String uri) Creates a new AnimatablePaintValue for a URI reference.floatdistanceTo(AnimatableValue other) Returns the absolute distance between this value and the specified other value.Returns the CSS text representation of the value.intReturns the type of paint this value represents.getURI()Returns the paint server URI.Returns a zero value of this AnimatableValue's type.interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier) Performs interpolation to the given value.Methods inherited from class AnimatableValue
formatNumber, hasChanged, toString, toStringRep
-
Field Details
-
PAINT_NONE
public static final int PAINT_NONE- See Also:
-
PAINT_CURRENT_COLOR
public static final int PAINT_CURRENT_COLOR- See Also:
-
PAINT_COLOR
public static final int PAINT_COLOR- See Also:
-
PAINT_URI
public static final int PAINT_URI- See Also:
-
PAINT_URI_NONE
public static final int PAINT_URI_NONE- See Also:
-
PAINT_URI_CURRENT_COLOR
public static final int PAINT_URI_CURRENT_COLOR- See Also:
-
PAINT_URI_COLOR
public static final int PAINT_URI_COLOR- See Also:
-
PAINT_INHERIT
public static final int PAINT_INHERIT- See Also:
-
paintType
protected int paintTypeThe type of paint. -
uri
The URI of the referenced paint server.
-
-
Constructor Details
-
AnimatablePaintValue
Creates a new, uninitialized AnimatablePaintValue. -
AnimatablePaintValue
Creates a new AnimatablePaintValue.
-
-
Method Details
-
createNonePaintValue
Creates a new AnimatablePaintValue for a 'none' value. -
createCurrentColorPaintValue
Creates a new AnimatablePaintValue for a 'currentColor' value. -
createColorPaintValue
public static AnimatablePaintValue createColorPaintValue(AnimationTarget target, float r, float g, float b) Creates a new AnimatablePaintValue for a color value. -
createURIPaintValue
Creates a new AnimatablePaintValue for a URI reference. -
createURINonePaintValue
Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback. -
createURICurrentColorPaintValue
public static AnimatablePaintValue createURICurrentColorPaintValue(AnimationTarget target, String uri) Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback. -
createURIColorPaintValue
public static AnimatablePaintValue createURIColorPaintValue(AnimationTarget target, String uri, float r, float g, float b) Creates a new AnimatablePaintValue for a URI reference with a color fallback. -
createInheritPaintValue
Creates a new AnimatablePaintValue for a 'inherit' value. -
interpolate
public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier) Performs interpolation to the given value.- Overrides:
interpolatein classAnimatableColorValue- Parameters:
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 value
-
getPaintType
public int getPaintType()Returns the type of paint this value represents. -
getURI
Returns the paint server URI. -
canPace
public boolean canPace()Returns whether two values of this type can have their distance computed, as needed by paced animation.- Overrides:
canPacein classAnimatableColorValue
-
distanceTo
Returns the absolute distance between this value and the specified other value.- Overrides:
distanceToin classAnimatableColorValue
-
getZeroValue
Returns a zero value of this AnimatableValue's type.- Overrides:
getZeroValuein classAnimatableColorValue
-
getCssText
Returns the CSS text representation of the value.- Overrides:
getCssTextin classAnimatableColorValue
-