org.apache.batik.anim.values

Class AnimatableTransformListValue

public class AnimatableTransformListValue extends AnimatableValue

An SVG transform list value in the animation system.
Field Summary
protected static SVGOMTransformIDENTITY_ROTATE
Identity transform value of type 'rotate'.
protected static SVGOMTransformIDENTITY_SCALE
Identity transform value of type 'scale'.
protected static SVGOMTransformIDENTITY_SKEWX
Identity transform value of type 'skewX'.
protected static SVGOMTransformIDENTITY_SKEWY
Identity transform value of type 'skewY'.
protected static SVGOMTransformIDENTITY_TRANSLATE
Identity transform value of type 'translate'.
protected Vectortransforms
List of transforms.
Constructor Summary
protected AnimatableTransformListValue(AnimationTarget target)
Creates a new, uninitialized AnimatableTransformListValue.
AnimatableTransformListValue(AnimationTarget target, AbstractSVGTransform t)
Creates a new AnimatableTransformListValue with a single transform.
AnimatableTransformListValue(AnimationTarget target, List transforms)
Creates a new AnimatableTransformListValue with a transform list.
Method Summary
booleancanPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.
floatdistanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.
floatdistanceTo1(AnimatableValue other)
Returns the distance between this value's first component and the specified other value's first component.
floatdistanceTo2(AnimatableValue other)
Returns the distance between this value's second component and the specified other value's second component.
floatdistanceTo3(AnimatableValue other)
Returns the distance between this value's third component and the specified other value's third component.
IteratorgetTransforms()
Gets the transforms.
AnimatableValuegetZeroValue()
Returns a zero value of this AnimatableValue's type.
AnimatableValueinterpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value.
static AnimatableTransformListValueinterpolate(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.
static AnimatableTransformListValueinterpolate(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.
StringtoStringRep()
Returns the CSS text representation of the value.

Field Detail

IDENTITY_ROTATE

protected static SVGOMTransform IDENTITY_ROTATE
Identity transform value of type 'rotate'.

IDENTITY_SCALE

protected static SVGOMTransform IDENTITY_SCALE
Identity transform value of type 'scale'.

IDENTITY_SKEWX

protected static SVGOMTransform IDENTITY_SKEWX
Identity transform value of type 'skewX'.

IDENTITY_SKEWY

protected static SVGOMTransform IDENTITY_SKEWY
Identity transform value of type 'skewY'.

IDENTITY_TRANSLATE

protected static SVGOMTransform IDENTITY_TRANSLATE
Identity transform value of type 'translate'.

transforms

protected Vector transforms
List of transforms.

Constructor Detail

AnimatableTransformListValue

protected AnimatableTransformListValue(AnimationTarget target)
Creates a new, uninitialized AnimatableTransformListValue.

AnimatableTransformListValue

public AnimatableTransformListValue(AnimationTarget target, AbstractSVGTransform t)
Creates a new AnimatableTransformListValue with a single transform.

AnimatableTransformListValue

public AnimatableTransformListValue(AnimationTarget target, List transforms)
Creates a new AnimatableTransformListValue with a transform list.

Method Detail

canPace

public boolean canPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.

distanceTo

public float distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.

distanceTo1

public float distanceTo1(AnimatableValue other)
Returns the distance between this value's first component and the specified other value's first component.

distanceTo2

public float distanceTo2(AnimatableValue other)
Returns the distance between this value's second component and the specified other value's second component.

distanceTo3

public float distanceTo3(AnimatableValue other)
Returns the distance between this value's third component and the specified other value's third component.

getTransforms

public Iterator getTransforms()
Gets the transforms.

getZeroValue

public AnimatableValue getZeroValue()
Returns a zero value of this AnimatableValue's type. This returns an empty transform list.

interpolate

public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given 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.

toStringRep

public String toStringRep()
Returns the CSS text representation of the value.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.