Hi Andre,

André Ávila <[EMAIL PROTECTED]> wrote on 03/31/2006 11:48:06 AM:

> Hi Thomas,
> 
> I tried your approach. Much simpler than mine, indeed, but you actually 
lose
> the dynamic behavior of the interactors. Only after the mouse is 
released,
> the other layers are transformed.

   Then you just need to do exactly the same thing with the
'setPaintingTransform' method.  This will make them all move in unison.

> In my approach, although you manage to keep the dynamic behavior for all
> canvases, synchronization is not perfect, meaning that there's a little 
lag
> in the repaint time. This is not at all unexpected, since I basically
> iterate in a list of canvases calling each one's transformation method.
> Maybe threading would alleviate this, but I doubt that it would be
> sufficient to keep the synchronization I want.

   Correct, when you modify the Rendering transform the content is 
rerendered for each update.

> So, I'm moving on to the overlay idea. I'm thinking, to do that I'll 
have to
> rasterize the svgs first, right? 

   If you manipulate the setPaintingTransform this will happen 
automatically.
It will pan/scale/rotate/etc the offscreen bitmap rather than rerender the
content.  Everything should be fairly quick unless you have huge canvases 
or
many layers.

> And then, in the paint() method of the
> original canvas, get the rendering transform of the canvas and use it to 
set
> the transform on the raster. Does that sound ok?

   It might be made to work, but setPaintingTransform is the way to go...


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to