Keywan Najafi Tonekaboni <[EMAIL PROTECTED]> 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).

Reply via email to