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. You can also use currentScaleTranslate (and or getScreenCTM) to conteract the scale/translate applied by the canvas. > 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. > It would have been great if we had an attribute that Batik checks to > determine if this element should be zoomed or not. Ex: <g id="layer1" > zoomable="yes"> or <g id="layer1" class="zoomable"> or something like that. Well Batik implements the SVG specification so you would want that in SVG not just Batik. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org