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.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL