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 socke <so...@web.de> on 2005/12/13 20:50:47 UTC
how can i pan a svg with the mousedragged method ?
dear friends,
does anybody know how i can use the SVGCanvas for translating a svg ?
instead of:
scrollDown.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
svgCanvas.getActionMap().get(JSVGCanvas.FAST_SCROLL_DOWN_ACTION).actionPerformed(e);
}
});
i want to pan the svg via mousedragged Method
maybe like this way:
public void mousedragged(MouseEvent e)
{
svgCanvas.translate(e.getX(), e.getY());
}
if the view is via zoom panned out, it should be possible to get the view back with dragging the mouse.
i would appreciate it, if anybody can help me.
is there any svgcanvas tutorial available?
best regards,
steve
Re: how can i pan a svg with the mousedragged method ?
Posted by th...@kodak.com.
Hi Steve,
sockensoldat@web.de wrote on 12/13/2005 02:50:47 PM:
> does anybody know how i can use the SVGCanvas for translating a svg ?
Try holding the 'shift' key down then mouse down and
drag the mouse across the canvas, release the mouse button
when you are done dragging.
> instead of:
>
> scrollDown.addActionListener(new ActionListener()
Take a look at the batik.swing.gvt.AbstractPanInteractor.
> if the view is via zoom panned out, it should be possible to get the
view back
> with dragging the mouse.
I don't follow this, but there are similar mouse actions for
interative zoom, rotate, etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org