Package com.kitfox.svg.animation
Class AnimateMotion
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.animation.AnimationElement
-
- com.kitfox.svg.animation.AnimateBase
-
- com.kitfox.svg.animation.AnimateXform
-
- com.kitfox.svg.animation.AnimateMotion
-
- All Implemented Interfaces:
java.io.Serializable
public class AnimateMotion extends AnimateXform
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<Bezier>
bezierSegs
(package private) double
curveLength
(package private) static java.util.regex.Matcher
matchPoint
private java.awt.geom.GeneralPath
path
private double
rotate
private int
rotateType
static int
RT_ANGLE
static int
RT_AUTO
static java.lang.String
TAG_NAME
-
Fields inherited from class com.kitfox.svg.animation.AnimationElement
AC_REPLACE, AC_SUM, AD_REPLACE, AD_SUM, AT_AUTO, AT_CSS, AT_XML, attribName, attribType, FT_AUTO, FT_DEFAULT, FT_FREEZE, FT_HOLD, FT_REMOVE, FT_TRANSITION
-
Fields inherited from class com.kitfox.svg.SVGElement
children, cssClass, diagram, id, ignorePresAttrib, inlineStyles, parent, presAttribs, serialVersionUID, SVG_NS, trackManager, xmlBase
-
-
Constructor Summary
Constructors Constructor Description AnimateMotion()
Creates a new instance of Animate
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
buildPath(java.lang.String from, java.lang.String to)
java.awt.geom.AffineTransform
eval(java.awt.geom.AffineTransform xform, double interp)
Evaluates this animation element for the passed interpolation time.java.awt.geom.GeneralPath
getPath()
double
getRotate()
int
getRotateType()
java.lang.String
getTagName()
void
loaderStartElement(SVGLoaderHelper helper, org.xml.sax.Attributes attrs, SVGElement parent)
Called during SAX load process to notify that this tag has begun the process of being loadedprivate void
paramaterizePath()
protected void
rebuild(AnimTimeParser animTimeParser)
void
setPath(java.awt.geom.GeneralPath path)
protected static void
setPoint(java.awt.geom.Point2D.Float pt, java.lang.String x, java.lang.String y)
void
setRotate(double rotate)
void
setRotateType(int rotateType)
-
Methods inherited from class com.kitfox.svg.animation.AnimateBase
evalParametric, getRepeatCount, getRepeatDur, setRepeatCount, setRepeatDur
-
Methods inherited from class com.kitfox.svg.animation.AnimationElement
animationElementToString, evalDurTime, evalEndTime, evalParametric, evalStartTime, getAccumulateType, getAdditiveType, getAttribName, getAttribType, getBeginTime, getDurTime, getEndTime, getFillType, hasEndTime, rebuild, setAccumulateType, setAdditiveType, setBeginTime, setDurTime, setEndTime, setFillType, updateTime
-
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, build, buildPath, getChild, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getRoot, getStyle, getStyle, getStyle, getStyleAbsolute, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddChild, loaderAddText, loaderEndElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, swapChildren
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
- See Also:
- Constant Field Values
-
matchPoint
static final java.util.regex.Matcher matchPoint
-
path
private java.awt.geom.GeneralPath path
-
rotateType
private int rotateType
-
rotate
private double rotate
-
RT_ANGLE
public static final int RT_ANGLE
- See Also:
- Constant Field Values
-
RT_AUTO
public static final int RT_AUTO
- See Also:
- Constant Field Values
-
bezierSegs
final java.util.ArrayList<Bezier> bezierSegs
-
curveLength
double curveLength
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Specified by:
getTagName
in classSVGElement
-
loaderStartElement
public void loaderStartElement(SVGLoaderHelper helper, org.xml.sax.Attributes attrs, SVGElement parent) throws org.xml.sax.SAXException
Description copied from class:SVGElement
Called during SAX load process to notify that this tag has begun the process of being loaded- Overrides:
loaderStartElement
in classAnimateXform
- Parameters:
helper
- - An object passed to all SVG elements involved in this build process to aid in sharing information.attrs
- - Attributes of this tag- Throws:
org.xml.sax.SAXException
-
setPoint
protected static void setPoint(java.awt.geom.Point2D.Float pt, java.lang.String x, java.lang.String y)
-
buildPath
private void buildPath(java.lang.String from, java.lang.String to)
-
paramaterizePath
private void paramaterizePath()
-
eval
public java.awt.geom.AffineTransform eval(java.awt.geom.AffineTransform xform, double interp)
Evaluates this animation element for the passed interpolation time. Interp must be on [0..1].- Specified by:
eval
in classAnimateXform
-
rebuild
protected void rebuild(AnimTimeParser animTimeParser) throws SVGException
- Overrides:
rebuild
in classAnimateBase
- Throws:
SVGException
-
getPath
public java.awt.geom.GeneralPath getPath()
- Returns:
- the path
-
setPath
public void setPath(java.awt.geom.GeneralPath path)
- Parameters:
path
- the path to set
-
getRotateType
public int getRotateType()
- Returns:
- the rotateType
-
setRotateType
public void setRotateType(int rotateType)
- Parameters:
rotateType
- the rotateType to set
-
getRotate
public double getRotate()
- Returns:
- the rotate
-
setRotate
public void setRotate(double rotate)
- Parameters:
rotate
- the rotate to set
-
-