Thanks, Thomas. It is perfect now.

I got a little confused with rendering and painting transform. For some
reason I played a lot with this code but never occured to me that I could be
applying the wrong transform. This is what happens after 14h work...

Anyway, I thought that pan interaction changed only the painting transform,
since is just repositioning a bitmap. So, what is the difference between
rendering and painting transform? Why do we need both?

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, April 12, 2006 3:37 PM
Subject: Re: Synchronizing JSVGCanvas - Again


> Hi Andre,
>
> André Ávila <[EMAIL PROTECTED]> wrote on 04/12/2006 02:08:14 PM:
>
> > I add my DrawOverlay to it, drawing
> > only a standard rectangle. When I try to pan the image, the rectangle
> goes
> > off on its own. If you would spare a few minutes on this, you could
> easily
> > reproduce this behavior using the following code:
> >
> >  private class DrawOverlay implements Overlay {
> >
> >     Shape rect = new Rectangle2D.Double(200,200,100,100);
> >
> >     public void paint(Graphics g) {
> >         AffineTransform at = getPaintingTransform();
>
>    This should be:
>         AffineTransform at = getRenderingTransform();
>
>    The painting transform (if any) has actually already been applied for
> you.
>
> > It's a bit strange, because it is essentially the same code as in
> > TextSelectionManager.SelectionOverlay.paint(). What am I missing?
>
>    The TextSelectionManager uses getRenderingTransform not
> getPaintingTransform().
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to