org.apache.batik.anim

Class MotionAnimation

public class MotionAnimation extends InterpolatingAnimation

An animation class for 'animateMotion' animations.
Field Summary
protected float[]keyPoints
The points defining the distance along the path that the keyTimes apply.
protected ExtendedGeneralPathpath
The path that describes the motion.
protected PathLengthpathLength
The path length calculation object.
protected floatrotateAngle
The angle of rotation (in radians) to use when automatic rotation is not being used.
protected booleanrotateAuto
Whether automatic rotation should be performed.
protected booleanrotateAutoReverse
Whether the automatic rotation should be reversed.
Constructor Summary
MotionAnimation(TimedElement timedElement, AnimatableElement animatableElement, int calcMode, float[] keyTimes, float[] keySplines, boolean additive, boolean cumulative, AnimatableValue[] values, AnimatableValue from, AnimatableValue to, AnimatableValue by, ExtendedGeneralPath path, float[] keyPoints, boolean rotateAuto, boolean rotateAutoReverse, float rotateAngle, short rotateAngleUnit)
Creates a new MotionAnimation.
Method Summary
protected voidsampledAtUnitTime(float unitTime, int repeatIteration)
Called when the element is sampled at the given unit time.

Field Detail

keyPoints

protected float[] keyPoints
The points defining the distance along the path that the keyTimes apply.

path

protected ExtendedGeneralPath path
The path that describes the motion.

pathLength

protected PathLength pathLength
The path length calculation object.

rotateAngle

protected float rotateAngle
The angle of rotation (in radians) to use when automatic rotation is not being used.

rotateAuto

protected boolean rotateAuto
Whether automatic rotation should be performed.

rotateAutoReverse

protected boolean rotateAutoReverse
Whether the automatic rotation should be reversed.

Constructor Detail

MotionAnimation

public MotionAnimation(TimedElement timedElement, AnimatableElement animatableElement, int calcMode, float[] keyTimes, float[] keySplines, boolean additive, boolean cumulative, AnimatableValue[] values, AnimatableValue from, AnimatableValue to, AnimatableValue by, ExtendedGeneralPath path, float[] keyPoints, boolean rotateAuto, boolean rotateAutoReverse, float rotateAngle, short rotateAngleUnit)
Creates a new MotionAnimation.

Method Detail

sampledAtUnitTime

protected void sampledAtUnitTime(float unitTime, int repeatIteration)
Called when the element is sampled at the given unit time. This updates the {@link #value} of the animation if active.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.