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 
> application I am showing map of europe in a JSVGCanvas. The cities are 
> 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 
> same size for the user's point of view. Can anybody help me out with 

  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 
your circle elements (this is mostly easily done if all the circles are 
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

View raw message