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 javaNoob <no...@yahoo.com> on 2007/09/19 19:53:52 UTC

how to prevent some elements change there sizes when zoomed?

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?
-- 
View this message in context: http://www.nabble.com/how-to-prevent-some-elements-change-there-sizes-when-zoomed--tf4482625.html#a12782782
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Re: how to prevent some elements change there sizes when zoomed?

Posted by th...@kodak.com.
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.