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 sanlin12 <mr...@gmail.com> on 2014/04/13 10:39:39 UTC

Frame based Animation

I am trying to make an animation by displaying a series of SVG images uisng
Java language. Here is a part of my code.

for(int i = 0; i < svgDocList.size(); i++)
{                    
    try {                       
        Thread.sleep(500);
    } catch (InterruptedException e) {      
        e.printStackTrace();
    }               
svgCanvas.setDocument(svgDocList.get(i));
}

When I run this, the canvas displayed only the first image of the list but
did not get update with other images of the list. What could be wrong? or
Any other ways of displaying a series of svg images?



--
View this message in context: http://batik.2283329.n4.nabble.com/Frame-based-Animation-tp4655991.html
Sent from the Batik - Users mailing list archive at Nabble.com.

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


Re: Frame based Animation

Posted by Greg Rossel <gr...@mapvision.com>.
Hi,

I dont know much about this but I had a similar problem with images. I used the
onload event to determine when an image was actually loaded. When it was loaded
I would move it into view since I loaded it off screen so it never looked choppy
prior to being loaded.

Good luck


On April 13, 2014 at 4:39 AM sanlin12 <mr...@gmail.com> wrote:
> I am trying to make an animation by displaying a series of SVG images uisng
> Java language. Here is a part of my code.
>
> for(int i = 0; i < svgDocList.size(); i++)
> {
> try {
> Thread.sleep(500);
> } catch (InterruptedException e) {
> e.printStackTrace();
> }
> svgCanvas.setDocument(svgDocList.get(i));
> }
>
> When I run this, the canvas displayed only the first image of the list but
> did not get update with other images of the list. What could be wrong? or
> Any other ways of displaying a series of svg images?
>
>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/Frame-based-Animation-tp4655991.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>