Class MotionAnimation
java.lang.Object
org.apache.batik.anim.AbstractAnimation
org.apache.batik.anim.InterpolatingAnimation
org.apache.batik.anim.MotionAnimation
An animation class for 'animateMotion' animations.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float[]The points defining the distance along the path that the keyTimes apply.protected ExtendedGeneralPathThe path that describes the motion.protected PathLengthThe path length calculation object.protected floatThe angle of rotation (in radians) to use when automatic rotation is not being used.protected booleanWhether automatic rotation should be performed.protected booleanWhether the automatic rotation should be reversed.Fields inherited from class InterpolatingAnimation
additive, calcMode, cumulative, keySplineCubics, keySplines, keyTimesFields inherited from class AbstractAnimation
animatableElement, beginTime, CALC_MODE_DISCRETE, CALC_MODE_LINEAR, CALC_MODE_PACED, CALC_MODE_SPLINE, composedValue, higherAnimation, isActive, isDirty, isFrozen, lowerAnimation, timedElement, toAnimation, usesUnderlyingValue, value -
Constructor Summary
ConstructorsConstructorDescriptionMotionAnimation(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
Modifier and TypeMethodDescriptionprotected voidsampledAtUnitTime(float unitTime, int repeatIteration) Called when the element is sampled at the given unit time.Methods inherited from class InterpolatingAnimation
sampledAt, sampledLastValue, willReplaceMethods inherited from class AbstractAnimation
getComposedValue, getTimedElement, getValue, markDirty, toString, usesUnderlyingValue
-
Field Details
-
path
The path that describes the motion. -
pathLength
The path length calculation object. -
keyPoints
protected float[] keyPointsThe points defining the distance along the path that the keyTimes apply. -
rotateAuto
protected boolean rotateAutoWhether automatic rotation should be performed. -
rotateAutoReverse
protected boolean rotateAutoReverseWhether the automatic rotation should be reversed. -
rotateAngle
protected float rotateAngleThe angle of rotation (in radians) to use when automatic rotation is not being used.
-
-
Constructor Details
-
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 Details
-
sampledAtUnitTime
protected void sampledAtUnitTime(float unitTime, int repeatIteration) Called when the element is sampled at the given unit time. This updates theAbstractAnimation.valueof the animation if active.- Specified by:
sampledAtUnitTimein classInterpolatingAnimation
-