xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Davern" <p.dav...@4c.ucc.ie>
Subject Re: remember zoom from previous document
Date Wed, 04 Mar 2009 15:46:53 GMT
Solved. 
I was doing the svgCanvas.setRenderingTransform(old);

before the new document was actually loaded and rendered. 

Thanks.

  ----- Original Message ----- 
  From: Paul Davern 
  To: batik-users@xmlgraphics.apache.org 
  Sent: Wednesday, March 04, 2009 12:43 PM
  Subject: remember zoom from previous document


  Hello,

  I have placed a slider into the squiggle app to show a set of .svg files which represent
the progress of a graph search. When I zoom in on a given svg file using left mouse and ctrl
I want that transform to be remembered when the user moves to the next document in the set.

  I do the following

  // do a zoom
  ....
  AffineTransform old =svgCanvas.getRenderingTransform();
  ....

  // add new document
  svgCanvas.setURI(filename);
  AffineTransform new =svgCanvas.getRenderingTransform();

  svgCanvas.setRenderingTransform(old);


  I can't get the JSVGCanvas to apply the old document's transform on the new document? Strange
that old appears to be the same as new, why is this?

  Thanks,
  Paul.
Mime
View raw message