> i 'have developped an application tha shows shapes (lines ) on canvas,
Please locate you shift key Mario. Is that an AWT
based Canvas that you are talking about? I usually find
it easier to avoid Canvas and render directly to a Container.
> now I need to perform such grafics like (zoomin, moving ecc..).
Moving in what sense? Do you mean that parts of the image
will move relative to other parts, like this simple 'dots
moving across a grid' for example,..
<http://www.physci.org/launcher.jsp#JAnimateFrame> ?
If you mean that type of moving, then..
> AffineTransform
> JViewport
> JScrollpane
..none of these will not do what you want.
> or Manually calucte coordinates.
That sounds like the only way if I understand your description.
Can you provide a short Java code example of what you mean?

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Mario - 26 Dec 2004 14:20 GMT
Ok,
It is a java.awt.Canvas, added to an JFrame.
On this Canvas I painted lines, this reppresents the streets of my city.
I' need zooming on that lines, to view streets that are invisible in a
1:1 scale.
I need moving the Canvas because when the user zooms on lines, the lines
go out of the view screen, and it is necessary that user can with
dragging mouse move through the entire map.
I hope is more clear, my English is terrible.
Thanks.
Mario
Chris Smith - 26 Dec 2004 15:48 GMT
> On this Canvas I painted lines, this reppresents the streets of my city.
> I' need zooming on that lines, to view streets that are invisible in a
[quoted text clipped - 3 lines]
> go out of the view screen, and it is necessary that user can with
> dragging mouse move through the entire map.
If you're talking about a wide variety of scale in drawing, then I'd
avoid trying to do this with AffineTransform or any other tricks. The
main problem is that you don't just want to draw bigger if when you're
zoomed in, but actually to draw more detail. In the end, you need to
customize your drawing code based on the scale anyway, so I'd zust zoom
or pan the view by hand. (Similar logic applies to panning; you
probably don't want to draw the entire map if someone's only going to
see a small potion of it.)

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
John McGrath - 27 Dec 2004 06:42 GMT
> (Similar logic applies to panning; you probably don't want to draw
> the entire map if someone's only going to see a small potion of it.)
If you just paint the area defined by the Graphics Context's clip region,
this would not apply. So using a JScrollPane for panning *might* be
appropriate, depending on the requirements for the UI.

Signature
Regards,
John McGrath
Mario <mario.g-calastri@swissonline.ch> wrote in news:41ceb0f1$1_4@
127.0.0.1:
> Hello everybody,
> i 'have developped an application tha shows shapes (lines ) on canvas,
[quoted text clipped - 10 lines]
>
> Bye Mario
Have a look at piccolo:
<http://www.cs.umd.edu/hcil/jazz/>
Chas Douglass