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 Michael <zo...@yahoo.com> on 2007/03/15 16:13:44 UTC

New to Batik/SVG: A Re-render vs. Repaint Question

I have a group (<g>) of objects that are shown within a viewBox. The idea
is to scroll through the group using the keyboard, highlighting the objects
within a colored rectangle, then selecting one of the object and sliding a
bigger version of the selected object into view. The scrolling,
highlighting, and selecting all work fine (I can get and set attributes,
update on the event thread using UpdateManager calling my Runnable, which
just calls immediateRepaint()).

However, my "sliding in" of a new object doesn't seem to work (I'm sure I'm
doing something wrong).

I'm using an animateMotion tag inside the <g> (the bigger objects are also
within a <g> and have an animateMotion tag). I can programmatically change
the path attributes but repaint does nothing. The funny thing is, I can
use straight javascript and SVG to do exactly what I want, load it into
Opera and it works fine (no javascript in the version loaded into Batik).

Then it occurred to me that maybe animation needs a re-rendering of the
document. But after Googling for a solution, it appears that the
UpdateManager is listening to the GVTTree for such an event and should do
this automatically (GVTTreeBuilderListener and GVTTreeRendererListener are
both registered on my JSVGCanvas).

Any help would be appreciated. I'm using Java version 1.4.2_12 and Batik
1.6 on OS X (10.3.9, fully updated).

TIA




 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

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


Re: New to Batik/SVG: A Re-render vs. Repaint Question

Posted by th...@kodak.com.
Hi Michael,

Michael <zo...@yahoo.com> wrote on 03/15/2007 11:13:44 AM:

> I'm using an animateMotion tag inside the <g> (the bigger objects are 
also
> within a <g> and have an animateMotion tag).

> Any help would be appreciated. I'm using Java version 1.4.2_12 and Batik
> 1.6 on OS X (10.3.9, fully updated).

   Batik 1.6 didn't support any SMIL animation.  However the current
trunk SVN version of Batik does support most of SMIL animation so your
slide-in should work with the current version of Batik (and the 1.7 
release when it comes out).


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