xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Scaling in batik extension
Date Fri, 02 Dec 2005 10:46:03 GMT
Hi Stephan,

"Stephan Zuiderwijk" <stephan.zuiderwijk@technolution.nl> wrote on 
12/01/2005 09:03:49 AM:

> I'm quite new to batik, I've got a question about scaling in batik. In a 
Java 
> application I am showing map of europe in a JSVGCanvas. The cities are 
shown 
> as little red circles. [...] what I want to achieve is the following. 
When a 
> user zooms in at the map, the circles should resize so that they stay at 
the 
> same size for the user's point of view. Can anybody help me out with 
this?

  You want to capture 'onzoom' events.  You can then query the 
currentScale on
the root SVG element.  You can then use this to update the 'r' attribute 
on
your circle elements (this is mostly easily done if all the circles are 
the
child of a 'cities' layer or something, then you can just iterate through
all the element children of the group and update the 'r' attribute).

  All of this can be done in either script or Java.
 

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


Mime
View raw message