Zoom Fucntion with Graphics 2D
I'm drawing some lines using Graphics2D and Line2D.Double in a frame. What i would like to do is a type of zoom on this drawing, ie via input box.
The situation is a i'm drawing a graph type drawing and would like to have the effect of zooming in a a particular section.
Here is an applet that zooms, without any fancy graphics
manipulation though. It just magnifies by using the
graphics drawImage method.
It zooms in on left mouse button and out w. right mouse
button, and it also scrolls the image. You reset it by
double mouse click.
Here is a demo
All that is needed is to change it to a JPanel and replace
the image retrieval code. Then it can be stuffed right
into a JFrame.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center