Package org.apache.batik.anim
Class MotionAnimation
- java.lang.Object
-
- org.apache.batik.anim.AbstractAnimation
-
- org.apache.batik.anim.InterpolatingAnimation
-
- org.apache.batik.anim.MotionAnimation
-
public class MotionAnimation extends InterpolatingAnimation
An animation class for 'animateMotion' animations.- Version:
- $Id: MotionAnimation.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]
keyPoints
The points defining the distance along the path that the keyTimes apply.protected ExtendedGeneralPath
path
The path that describes the motion.protected PathLength
pathLength
The path length calculation object.protected float
rotateAngle
The angle of rotation (in radians) to use when automatic rotation is not being used.protected boolean
rotateAuto
Whether automatic rotation should be performed.protected boolean
rotateAutoReverse
Whether the automatic rotation should be reversed.-
Fields inherited from class org.apache.batik.anim.InterpolatingAnimation
additive, calcMode, cumulative, keySplineCubics, keySplines, keyTimes
-
Fields inherited from class org.apache.batik.anim.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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
sampledAtUnitTime(float unitTime, int repeatIteration)
Called when the element is sampled at the given unit time.-
Methods inherited from class org.apache.batik.anim.InterpolatingAnimation
sampledAt, sampledLastValue, willReplace
-
Methods inherited from class org.apache.batik.anim.AbstractAnimation
getComposedValue, getTimedElement, getValue, markDirty, toString, usesUnderlyingValue
-
-
-
-
Field Detail
-
path
protected ExtendedGeneralPath path
The path that describes the motion.
-
pathLength
protected PathLength pathLength
The path length calculation object.
-
keyPoints
protected float[] keyPoints
The points defining the distance along the path that the keyTimes apply.
-
rotateAuto
protected boolean rotateAuto
Whether automatic rotation should be performed.
-
rotateAutoReverse
protected boolean rotateAutoReverse
Whether the automatic rotation should be reversed.
-
rotateAngle
protected float rotateAngle
The angle of rotation (in radians) to use when automatic rotation is not being used.
-
-
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 theAbstractAnimation.value
of the animation if active.- Specified by:
sampledAtUnitTime
in classInterpolatingAnimation
-
-