|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.anim.AnimationEngine
org.apache.batik.bridge.SVGAnimationEngine
public class SVGAnimationEngine
An AnimationEngine for SVG documents.
Nested classes/interfaces inherited from class org.apache.batik.anim.AnimationEngine |
---|
AnimationEngine.AnimationInfo, AnimationEngine.Listener, AnimationEngine.Sandwich, AnimationEngine.TargetInfo |
Field Summary | |
---|---|
protected SVGAnimationEngine.AnimatableLengthOrIdentFactory |
animatableLengthOrIdentFactory
The factory for length-or-ident values. |
protected SVGAnimationEngine.AnimatableNumberOrIdentFactory |
animatableNumberOrIdentFactory
The factory for number-or-ident values. |
protected static Set |
animationEventNames11
Set of SMIL animation event names for SVG 1.1. |
protected static Set |
animationEventNames12
Set of SMIL animation event names for SVG 1.2. |
protected float |
animationLimitingAmount
The amount of animation limiting. |
protected int |
animationLimitingMode
The animation limiting mode. |
protected SVGAnimationEngine.AnimationThread |
animationThread
The thread that ticks the animation engine. |
protected SVGAnimationEngine.AnimationTickRunnable |
animationTickRunnable
The Runnable that ticks the document. |
protected CSSEngine |
cssEngine
The CSSEngine used for CSS value parsing. |
protected BridgeContext |
ctx
The BridgeContext to use for value parsing. |
protected StyleMap |
dummyStyleMap
A StyleMap used by the SVGAnimationEngine.Factory s when computing CSS values. |
protected SVGAnimationEngine.Factory[] |
factories
Factories for AnimatableValue parsing. |
protected LinkedList |
initialBridges
List of bridges that will be initialized when the document is started. |
protected boolean |
isSVG12
Whether the document is an SVG 1.2 document. |
protected boolean |
started
Whether animation processing has started. |
protected SVGAnimationEngine.UncomputedAnimatableStringValueFactory |
uncomputedAnimatableStringValueFactory
The factory for unparsed string values. |
Fields inherited from class org.apache.batik.anim.AnimationEngine |
---|
ANIM_TYPE_CSS, ANIM_TYPE_OTHER, ANIM_TYPE_XML, animations, document, MAP_ENTRY_ARRAY, pauseTime, targetListener, targets, timedDocumentRoot |
Constructor Summary | |
---|---|
SVGAnimationEngine(Document doc,
BridgeContext ctx)
Creates a new SVGAnimationEngine. |
Method Summary | |
---|---|
void |
addInitialBridge(SVGAnimationElementBridge b)
Adds an animation element bridge to the list of bridges that require initializing when the document is started. |
protected TimedDocumentRoot |
createDocumentRoot()
Creates a new returns a new TimedDocumentRoot object for the document. |
void |
dispose()
Disposes this animation engine. |
float |
getCurrentTime()
Returns the current document time. |
AnimatableValue |
getUnderlyingCSSValue(Element animElt,
AnimationTarget target,
String pn)
Returns an AnimatableValue for the underlying value of a CSS property. |
boolean |
hasStarted()
Returns whether animation processing has begun. |
AnimatableValue |
parseAnimatableValue(Element animElt,
AnimationTarget target,
String ns,
String ln,
boolean isCSS,
String s)
Parses an AnimatableValue. |
void |
pause()
Pauses the animations. |
void |
setAnimationLimitingCPU(float pc)
Sets the animation limiting mode to a percentage of CPU. |
void |
setAnimationLimitingFPS(float fps)
Sets the animation limiting mode to a number of frames per second. |
void |
setAnimationLimitingNone()
Sets the animation limiting mode to "none". |
float |
setCurrentTime(float t)
Sets the current document time. |
void |
start(long documentStartTime)
Starts the animation engine. |
void |
unpause()
Pauses the animations. |
Methods inherited from class org.apache.batik.anim.AnimationEngine |
---|
addAnimation, addTimegraphListener, getAnimationInfo, getSandwich, getTargetInfo, isPaused, moveToBottom, moveToTop, pushDown, removeAnimation, removeFill, removeTimegraphListener, sampledAt, sampledLastValue, tick, toActive, toInactive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BridgeContext ctx
protected CSSEngine cssEngine
protected boolean started
protected SVGAnimationEngine.AnimationTickRunnable animationTickRunnable
protected SVGAnimationEngine.UncomputedAnimatableStringValueFactory uncomputedAnimatableStringValueFactory
protected SVGAnimationEngine.AnimatableLengthOrIdentFactory animatableLengthOrIdentFactory
protected SVGAnimationEngine.AnimatableNumberOrIdentFactory animatableNumberOrIdentFactory
protected SVGAnimationEngine.Factory[] factories
AnimatableValue
parsing.
protected boolean isSVG12
protected LinkedList initialBridges
protected StyleMap dummyStyleMap
SVGAnimationEngine.Factory
s when computing CSS values.
protected SVGAnimationEngine.AnimationThread animationThread
protected int animationLimitingMode
protected float animationLimitingAmount
protected static final Set animationEventNames11
protected static final Set animationEventNames12
Constructor Detail |
---|
public SVGAnimationEngine(Document doc, BridgeContext ctx)
Method Detail |
---|
public void dispose()
dispose
in class AnimationEngine
public void addInitialBridge(SVGAnimationElementBridge b)
public boolean hasStarted()
public AnimatableValue parseAnimatableValue(Element animElt, AnimationTarget target, String ns, String ln, boolean isCSS, String s)
public AnimatableValue getUnderlyingCSSValue(Element animElt, AnimationTarget target, String pn)
public void pause()
pause
in class AnimationEngine
public void unpause()
unpause
in class AnimationEngine
public float getCurrentTime()
getCurrentTime
in class AnimationEngine
public float setCurrentTime(float t)
setCurrentTime
in class AnimationEngine
protected TimedDocumentRoot createDocumentRoot()
createDocumentRoot
in class AnimationEngine
public void start(long documentStartTime)
public void setAnimationLimitingNone()
public void setAnimationLimitingCPU(float pc)
pc
- the maximum percentage of CPU to use (0 < pc ≤ 1)public void setAnimationLimitingFPS(float fps)
fps
- the maximum number of frames per second (fps > 0)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |