I am displaying a BufferedImage in a
JPanel.
I have provided the user the ability to zoom in on any area of the BufferedImage by modifying the Graphic's AffineTransform.
When I do zoom way in on the BufferedImage (e.g. the BufferedImage is 10 times larger than the JPanel), does Java automatically set the clipping rect to the visible part of the BufferedImage?
Or does it repaint the entire Image in its off-screen buffer?
I'm wondering if I could expect some preformance improvements by trying to specify the exact clipping rect.
I have provided the user the ability to zoom in on any area of the BufferedImage by modifying the Graphic's AffineTransform.
When I do zoom way in on the BufferedImage (e.g. the BufferedImage is 10 times larger than the JPanel), does Java automatically set the clipping rect to the visible part of the BufferedImage?
Or does it repaint the entire Image in its off-screen buffer?
I'm wondering if I could expect some preformance improvements by trying to specify the exact clipping rect.
I'm also doing
some drawing on top of the image and I do notice some performance slow down when
zooming way, i.e. when the image is much larger than the
panel.
Is there any
on-line source (e.g. tutorial) that would explain the basics of how to boost
performance in this situation:
1. displaying a
buffered image
2. drawing on top
of the buffered image
3. zooming way in
on the image
Thank
you,
Ted
Hill
