Package org.apache.batik.anim.values
Class AnimatableTransformListValue
java.lang.Object
org.apache.batik.anim.values.AnimatableValue
org.apache.batik.anim.values.AnimatableTransformListValue
An SVG transform list value in the animation system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static SVGOMTransform
Identity transform value of type 'rotate'.protected static SVGOMTransform
Identity transform value of type 'scale'.protected static SVGOMTransform
Identity transform value of type 'skewX'.protected static SVGOMTransform
Identity transform value of type 'skewY'.protected static SVGOMTransform
Identity transform value of type 'translate'.protected Vector
List of transforms.Fields inherited from class org.apache.batik.anim.values.AnimatableValue
decimalFormat, hasChanged, target
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new, uninitialized AnimatableTransformListValue.AnimatableTransformListValue
(AnimationTarget target, List transforms) Creates a new AnimatableTransformListValue with a transform list.Creates a new AnimatableTransformListValue with a single transform. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.float
distanceTo
(AnimatableValue other) Returns the absolute distance between this value and the specified other value.float
distanceTo1
(AnimatableValue other) Returns the distance between this value's first component and the specified other value's first component.float
distanceTo2
(AnimatableValue other) Returns the distance between this value's second component and the specified other value's second component.float
distanceTo3
(AnimatableValue other) Returns the distance between this value's third component and the specified other value's third component.Gets the transforms.Returns a zero value of this AnimatableValue's type.static AnimatableTransformListValue
interpolate
(AnimatableTransformListValue res, AnimatableTransformListValue value1, AnimatableTransformListValue value2, AnimatableTransformListValue to1, AnimatableTransformListValue to2, float interpolation1, float interpolation2, AnimatableTransformListValue accumulation, int multiplier) Performs a two-way interpolation between the specified values.static AnimatableTransformListValue
interpolate
(AnimatableTransformListValue res, AnimatableTransformListValue value1, AnimatableTransformListValue value2, AnimatableTransformListValue value3, AnimatableTransformListValue to1, AnimatableTransformListValue to2, AnimatableTransformListValue to3, float interpolation1, float interpolation2, float interpolation3, AnimatableTransformListValue accumulation, int multiplier) Performs a three-way interpolation between the specified values.interpolate
(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier) Performs interpolation to the given value.Returns the CSS text representation of the value.Methods inherited from class org.apache.batik.anim.values.AnimatableValue
formatNumber, getCssText, hasChanged, toString
-
Field Details
-
IDENTITY_SKEWX
Identity transform value of type 'skewX'. -
IDENTITY_SKEWY
Identity transform value of type 'skewY'. -
IDENTITY_SCALE
Identity transform value of type 'scale'. -
IDENTITY_ROTATE
Identity transform value of type 'rotate'. -
IDENTITY_TRANSLATE
Identity transform value of type 'translate'. -
transforms
List of transforms.
-
-
Constructor Details
-
AnimatableTransformListValue
Creates a new, uninitialized AnimatableTransformListValue. -
AnimatableTransformListValue
Creates a new AnimatableTransformListValue with a single transform. -
AnimatableTransformListValue
Creates a new AnimatableTransformListValue with a transform list.
-
-
Method Details
-
interpolate
public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier) Performs interpolation to the given value.- Specified by:
interpolate
in classAnimatableValue
- 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
-
interpolate
public static AnimatableTransformListValue interpolate(AnimatableTransformListValue res, AnimatableTransformListValue value1, AnimatableTransformListValue value2, AnimatableTransformListValue to1, AnimatableTransformListValue to2, float interpolation1, float interpolation2, AnimatableTransformListValue accumulation, int multiplier) Performs a two-way interpolation between the specified values. value[12] and to[12] must all be of the same type, either scale or translation transforms, or all null. -
interpolate
public static AnimatableTransformListValue interpolate(AnimatableTransformListValue res, AnimatableTransformListValue value1, AnimatableTransformListValue value2, AnimatableTransformListValue value3, AnimatableTransformListValue to1, AnimatableTransformListValue to2, AnimatableTransformListValue to3, float interpolation1, float interpolation2, float interpolation3, AnimatableTransformListValue accumulation, int multiplier) Performs a three-way interpolation between the specified values. value[123] and to[123] must all be single rotation transforms, or all null. -
getTransforms
Gets the transforms. -
canPace
public boolean canPace()Returns whether two values of this type can have their distance computed, as needed by paced animation.- Specified by:
canPace
in classAnimatableValue
-
distanceTo
Returns the absolute distance between this value and the specified other value.- Specified by:
distanceTo
in classAnimatableValue
-
distanceTo1
Returns the distance between this value's first component and the specified other value's first component. -
distanceTo2
Returns the distance between this value's second component and the specified other value's second component. -
distanceTo3
Returns the distance between this value's third component and the specified other value's third component. -
getZeroValue
Returns a zero value of this AnimatableValue's type. This returns an empty transform list.- Specified by:
getZeroValue
in classAnimatableValue
-
toStringRep
Returns the CSS text representation of the value.- Overrides:
toStringRep
in classAnimatableValue
-