You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2007/10/04 13:48:19 UTC
Re: how to prevent some elements change there sizes when zoomed?
Hi JavaNoob,
javaNoob <no...@yahoo.com> wrote on 09/19/2007 01:53:52 PM:
> how can i prevent some elements to change there sizes when zoomed? if i
have
> many layers, can i just zoom on some layers only?
The only way to do this is to listen for SVG Zoom events and then apply
a compensating transform to the layers (groups) that you don't want to
zoom.
The tricky bit is that if you want to do this to say 'symbols' like on a
map
then you can't simply unscale the whole group because then your symbols
wouldn't move to the right place, so you need to allow the layer to scale
but
then change the scale of each of the symbol elements. There are some
tricks
using markers and the like that can make this a little easier, but it's
pretty
tricky really.