xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Zuiderwijk" <stephan.zuiderw...@technolution.nl>
Subject RE: Scaling in batik extension
Date Mon, 05 Dec 2005 07:04:16 GMT
Hi thomas,

thank you for your fast reply. I've been playing around with your
sugestions. It works fine. Because of the large amount of items (app. 5500)
I cached the circle elements when my JSVGCanvas is first opened. 

Kind regards,

Stephan Zuiderwijk 

-----Original Message-----
From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
Sent: Friday, December 02, 2005 11:46 AM
To: batik-users@xmlgraphics.apache.org
Subject: Re: Scaling in batik extension

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


---------------------------------------------------------------------
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