• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Zooming in on a picture?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am making a program which involves zooming in on a picture made out of an Image and several shapes drawn on using Graphics methods, where a JSlider is used to change the magnification, and the picture is on a JPanel subclass. I have written a zoom method, which works but is very slow and often causes the computer to run out of memory, especially when zooming in on images larger than about 200x200, with a magnification of over 3x. Here is the code (toDraw is an Image of what is currently on the display, and is painted onto the screen in the paint method):

Is there any way I could change this to make the zooming a lot faster?
Thanks.
[ June 30, 2003: Message edited by: G Bryan ]
 
Everybody's invited. Except this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic