zoom In/zoom Out an Image
I am developing an applet application, in which I have placed an
Image, now I want the Image to Zoom In and Zoom Out, how can I do
Thanks in advance
Re: zoom In/zoom Out an Image
Zoom in and zoom out use the exact same techniques.
The Graphics2D translate() method sets the top left corner of the
viewable image. The translation happens *after* the image has been
scaled..so your numbers need to be scaled.
For zooming in and zooming out, just use values that are inverses of
each other. For example, if you zoom in 1.25 each time, such that each
time you zoom, your scale *= 1.25, then to zoom out, your scale *= .8
(or scale /= 1.25)
|All times are GMT. The time now is 06:32 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.