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 Chris Cruzdal <cc...@yahoo.com> on 2004/02/03 09:14:48 UTC
Show Rendering When Panning
Hi,
I have another question, this time regarding how it is
possible to enable rendering the _whole_ SVG document
and not just the originally visible _part_ when
panning. I am using Batik in an applet to dispay quite
large graphs, thus the users need to pan the document.
This works perfectly, but I cannot figure out how I
can make the JSVGCanvas (well, I am overriding a few
methods there, so it is a subclass of JSVGCanvas)
render the document in such a way that users can see
what will be visible after panning, and not only what
was visible before panning.
In other words, I am looking for something like the
"Show window contents while dragging." in Windows.
Help appreciated, thanks a lot,
Chris
--
Chris Cruzdal
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: Show Rendering When Panning
Posted by Chris Cruzdal <cc...@yahoo.com>.
Hi,
what I did is I simply changed the
AbstractPanInteractor which comes with Batik, made it
use setRenderingTransform() instead of
setPaintingTransform() in the mouseDragged() method,
recompiled, and tried the stuff. Now, it appears to do
what I wanted previously, but
a) very slowly, I guess because my graphs are a bit
complex, as it stalls on a Pentium 3200 with 2048 Ram
=) --- and,
b) it messes up the transformation; i.e. it always
goes back to the initial transformation, even though I
think that I preserve the rendering transformation: I
use
AffineTransform at =
AffineTransform.getTranslateInstance(xCurrent -
xStart,
yCurrent - yStart);
AffineTransform rt =
(AffineTransform)c.getRenderingTransform().clone();
rt.preConcatenate(at);
c.setRenderingTransform(rt);
as my code. As it is currently too slow, it is very
likely that I will not use it, but I would still be
interested in knowing how to preserve the rendering
transformation.
Thanks,
Chris
--
Chris Cruzdal
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
Re: Show Rendering When Panning
Posted by Thomas DeWeese <Th...@Kodak.com>.
Chris Cruzdal wrote:
> I have another question, this time regarding how it is
> possible to enable rendering the _whole_ SVG document
> and not just the originally visible _part_ when
> panning. I am using Batik in an applet to dispay quite
> large graphs, thus the users need to pan the document.
> This works perfectly, but I cannot figure out how I
> can make the JSVGCanvas (well, I am overriding a few
> methods there, so it is a subclass of JSVGCanvas)
> render the document in such a way that users can see
> what will be visible after panning, and not only what
> was visible before panning.
This is done because it can be quite expensive to
try and do this 'live' - however for simple images
like graphs this probably isn't a big deal.
You will need to replace the pan interactor from
batik.swing.gvt with an implementation that uses
'setRenderingTransform' instead of 'setPaintingTransform'.
> In other words, I am looking for something like the
> "Show window contents while dragging." in Windows.
This will probably perform better for 'static' documents
compared with dynamic documents.
>
> Help appreciated, thanks a lot,
>
> Chris
> --
> Chris Cruzdal
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
>
> ---------------------------------------------------------------------
> 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