Thanks Thomas for your reply.
I am still new to Batik and SVG so please bear with me and correct me if I
say anything wrong.

>On Jul 26, 2012; 9:09pm, DeWeese Thomas wrote:
>
> Hi Fireball, 
> 
> On Jul 25, 2012, at 1:01 PM, fireball wrote: 
> 
>> I would like to know if there is a way in Batik to zoom some specific 
>> layers. What I mean is, for example, let's say we have two
>> groups(layers): 
>> <g id="layer1"> 
>> </g> 
>> <g id="layer2"> 
>> </g> 
>
>        You can always add a transform with a scale to one of the groups. 
>Managing all of the translate/scale stuff with mouse events is a bit
tricky. 

Do you mean if I add transform with scale to specific groups, only those
groups will be zoomed when user clicks ctrl+I for instance?
Or do you mean I have to get each specific group individually and then call
setAttribute with
transform and scale as parameters on it? Which means I have to keep track of
which groups I added scale to...

>
>        You can also use currentScaleTranslate (and or getScreenCTM) to 
>conteract the scale/translate applied by the canvas. 

Can you elaborate a bit more please? Not sure I am following. How to use
this to zoom one group and not the other?

>
>> Using Batik's default zooming or creating a new one that listens to 
>> mousewheel, is there a way to tell Batik that it should zoom "layer1" and 
>> not "layer2". Note that both layers are displayed to the users at the
>> same 
>> canvas. 
>
>        You can always replace the mouse listeners on the canvas. 
>The JSVGComponent is the same as the JSVGCanvas but with essentially none 
>of the built in behaviors of the canvas.

I am thinking of disabling all zooming keys and only allow mousewheel to do
it. But Batik does not support mousewheel zoom, or does it? Without extra
coding I mean.



--
View this message in context: 
http://batik.2283329.n4.nabble.com/Zooming-in-specific-layers-tp4655149p4655155.html
Sent from the Batik - Users mailing list archive at Nabble.com.

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

Reply via email to