Well I've gotten a little farther, but now I'm getting new errors.

When I hit the refresh button, I store a copy of the current rendering
transform.  I call setDocument() on the JSVGCanvas.  Then I wait for the
GVT tree to finish rendering
(GVTTreeRendererAdapter.gvtRenderingCompleted()).  After that's
finished, I set the rendering transform back and get the following
error:

java.awt.image.RasterFormatException: (x + width) is outside raster
        at
sun.awt.image.IntegerInterleavedRaster.createWritableChild(IntegerInterl
eavedRaster.java:450)
        at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(Unknown
Source)
        at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown
Source)
        at org.apache.batik.swing.gvt.GVTTreeRenderer.run(Unknown
Source)

Any ideas?

Michael Bishop

-----Original Message-----
From: Scott A. Ruffner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 07, 2006 2:44 PM
To: [email protected]
Subject: Re: "Refreshing" the JSVGCanvas...

Bishop, Michael W. CONTR J9C880 wrote:
> I guess it would work.  What is the difference between the rendering
transform and the view box transform?  I just want the JSVGCanvas to be
zoomed/panned as it was...I imagine this will do that?
>  
> Michael Bishop

hi, michael --

if you look at the code for the "zoom", "pan" and "rotate" interactors
that come with JSVGCanvas, you'll discover that what they change is
the canvas's "rendering transform".  so, if you can preserve that
when you update your SVG document, then you will preserve the effects
of any previous zoom/pan/rotate's that the user executed...

scott
-- 
Scott A. Ruffner, Scientific Programmer/Analyst
Lisberger Lab
W.M. Keck Foundation Center for Integrative Neuroscience
University of California -- San Francisco
513 Parnassus Avenue, Box 0444, S871
San Francisco, CA  94143-0444
415-502-7897

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

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

Reply via email to