[prev in list] [next in list] [prev in thread] [next in thread]
List: batik-users
Subject: Re: remember zoom from previous document
From: "Paul Davern" <p.davern () 4c ! ucc ! ie>
Date: 2009-03-04 15:46:53
Message-ID: FD7D99BACDFC41C3B5ED768B7BF24E61 () 4c147
[Download RAW message or body]
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.
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff background="">
<DIV><FONT face=Arial size=2>Solved. </FONT></DIV>
<DIV><FONT face=Arial size=2>I was doing the <FONT face=Arial
size=2>svgCanvas.setRenderingTransform(old);</FONT></DIV>
<DIV> </DIV>
<DIV>before the new document was actually loaded and rendered. </DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV> </DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 \
2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message \
----- </DIV> <DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=p.davern@4c.ucc.ie href="mailto:p.davern@4c.ucc.ie">Paul Davern</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=batik-users@xmlgraphics.apache.org
href="mailto:batik-users@xmlgraphics.apache.org">batik-users@xmlgraphics.apache.org</A> \
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, March 04, 2009 12:43
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> remember zoom from previous
document</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hello,<BR><BR>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.<BR><BR>I do the following<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>// do a zoom</FONT></DIV>
<DIV><FONT face=Arial size=2>....</FONT></DIV>
<DIV><FONT face=Arial size=2>AffineTransform old
=svgCanvas.getRenderingTransform();<BR>....</FONT></DIV><FONT face=Arial
size=2></FONT><FONT face=Arial size=2></FONT>
<DIV><BR><FONT face=Arial size=2>// add new
document<BR>svgCanvas.setURI(filename);</FONT></DIV>
<DIV><FONT face=Arial size=2>AffineTransform new
=svgCanvas.getRenderingTransform();</FONT><BR><FONT face=Arial
size=2></FONT></DIV>
<DIV><FONT face=Arial
size=2>svgCanvas.setRenderingTransform(old);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV><BR>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?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Paul.</FONT></DIV></BLOCKQUOTE></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic