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]