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 Keywan Najafi Tonekaboni <li...@prometoys.net> on 2008/04/19 14:41:06 UTC
Syncing Overlay with the SVGCanvas transform
Hi,
if the user click in my whiteboard on a shape, the element will be
converted to a awt.Shape and drawn to an overlay. But when I scroll, the
selection (or the overlay) is repainted on the wrong place. It is
absolute to the viewbox, but I want it absolute to the document.
Is there an easy way to sync the Overlays with
JSVGCanvas.getViewBoxTransform()?
Regards,
Keywan
--
Keywan Najafi Tonekaboni
http://www.prometoys.net
people@world:/# apt-get --purge remove dominion
After unpacking world will be freed.
You are about to do something potentially beneficial
To continue type in the phrase 'Yes, do as We say!'
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Syncing Overlay with the SVGCanvas transform
Posted by th...@kodak.com.
Keywan Najafi Tonekaboni <li...@prometoys.net> wrote on 04/19/2008
08:41:06 AM:
> if the user click in my whiteboard on a shape, the element will be
> converted to a awt.Shape and drawn to an overlay. But when I scroll, the
> selection (or the overlay) is repainted on the wrong place. It is
> absolute to the viewbox, but I want it absolute to the document.
>
> Is there an easy way to sync the Overlays with
> JSVGCanvas.getViewBoxTransform()?
Well in the paint method for your overlay you can call:
g2d.transform(canvas.getViewBoxTransform())
Of course then you need to be careful to map any AWT mouse
events to the viewBox coordinate system (dom mouse events are
already in the viewbox coordinate system).