xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Ávila <asan...@nextech.com.br>
Subject Re: Synchronizing JSVGCanvas - Again
Date Wed, 12 Apr 2006 18:54:47 GMT
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: <thomas.deweese@kodak.com>
To: <batik-users@xmlgraphics.apache.org>
Cc: <batik-users@xmlgraphics.apache.org>
Sent: Wednesday, April 12, 2006 3:37 PM
Subject: Re: Synchronizing JSVGCanvas - Again


> Hi Andre,
>
> André Ávila <asantos@nextech.com.br> 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: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message