Re: [JAVA2D] Zoom relative to mouse position

2008-08-15 Thread java2d
Did you figure this out yet? It's your only post and it was 3 months ago so I don't think you'll see it. But a couple of things I noticed. If you're going to transform the shape itself and not the whole graphic, I would separate the location of the shape from its geometry. Think of defining the

[JAVA2D] Zoom relative to mouse position

2008-05-19 Thread java2d
Hi, I am trying to figure out how to zoom relative to the mouse pointer position. Below, please find my sample code. When I position the mouse pointer on one corner of the red rectangle and use the mouse wheel, I am able to zoom in and out as expected. As soon as I move the pointer position,