You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Edward Turner <mi...@hotmail.com> on 2003/09/30 11:09:44 UTC

How can Java call SVG animation? Possible?

Hi there,

Please excuse me from any thick questions I ask - just started using batik!

I've got a Java application that requires simple custom animation - which my 
client will define. I'm proposing to use SVG and batik for this. I have read 
up on batik and tried out Squiggle examples and it seems that batik would be 
ideal for this - no?

The major requirement is two way communication between Java and SVG.

While testing I have had difficulty in making Java communicate with SVG 
(comm the other way is fine): can Java call an animation sequence in an SVG 
page? Can it call ecma functions? If so how should I do this?

Any help, example code or whatever would be great,

Seeya then - Edd.

Edward Turner
et200@alumni.soton.ac.uk

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: How can Java call SVG animation? Possible?

Posted by Thomas DeWeese <Th...@Kodak.com>.
Edward Turner wrote:
> Hi there,
> 
> Please excuse me from any thick questions I ask - just started using batik!
> 
> I've got a Java application that requires simple custom animation - 
> which my client will define. I'm proposing to use SVG and batik for 
> this. I have read up on batik and tried out Squiggle examples and it 
> seems that batik would be ideal for this - no?

    Perhaps,  what exactly do you mean by 'animation'?  If you have read
up on Batik you may be aware that while it is the most complete
implementation of Static SVG, and may be as well for the SVG DOM it does
not implement any part of SMIL animation.  So if your animation is done
using ECMA Script then yes Batik will be very useful - if the animation is
done using SMIL animation (or a combination of SMIL and ECMA) then it will
be almost worthless :)

> The major requirement is two way communication between Java and SVG.
> 
> While testing I have had difficulty in making Java communicate with SVG 
> (comm the other way is fine): can Java call an animation sequence in an 
> SVG page? Can it call ecma functions? If so how should I do this?

    It can call ecma functions, it can not call SMIL animations (as we don't
have them).  To call ecma functions you need to use code similar to that used
in xml-batik/test-sources/org/apache/batik/swing/JSVGCanvasHandler.java
in it's 'bindHost' method (you may need to view this with 'viewcvs' -
check the cvs page from the batik web site).  Make sure to do this in the
UpdateManager thread as the example code does.


> Any help, example code or whatever would be great,

    I hope the above helps.

> 
> Seeya then - Edd.
> 
> Edward Turner
> et200@alumni.soton.ac.uk
> 
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today! 
> http://www.msn.co.uk/messenger
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org