Hi,

On Feb 13, 2008 9:42 PM, Oliver Brook <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I'm creating a small drawing and (hopefully) animation tool using
> Batik. I'd like to know whether it is possible to get control of the
> playback of an animation in a JSVGCanvas. I've tried using the
> following:
>
> SVGOMSVGElement.pauseAnimations();
> SVGOMSVGElement.unPauseAnimations();
> SVGOMSVGElement.setDocumentTime();
>
> This kind of works, but the canvas is not updated correctly when I set
> the document time somewhere between the "begin" and "duration" times
> of an animation element. Is there a correct way to get the JSVGCanvas
> to redraw an animation at a specific time and have it render the
> 'between' stages of an animation element properly?
>
> Any advice would be greatly appreciated.
>

Did you try to use SVGAnimationEngine class (supplied with Batik) instead ?

You can get the SVGAnimationEngine from the BridgeContext eg:
SVGAnimationEngine animEng =  bridgeContext.getAnimationEngine()

You can do a lot things with this SVGAnimationEngine
eg:
animEng.start(millis);
animEngine.pause();
animEng.setCurrentTime(value);
etc

On our *simple animation test, this provide smooth and instant
redraw/refresh of SVG animation.

Note: I do not know whether this approach (SVGAnimationEngine) or your
approach, is the correct way, and which one should provide better svg
animation controller.

Cheers
Tonny Kohar
-- 
Sketsa SVG Editor
imagine, design, create ...
http://www.kiyut.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to