I’m wondering what the fastest way to draw only a portion of an Image is. Right now I am using g.drawImage ( Image image, int sx1, int sy1, int sx2, int sy2, int dx1, int dy1, int dx2, int dy2, ImageObserver observer ). However, this function can also do scaling, so I’m not sure if it is optimized to deal with the case when no scaling has to be done.
The other way I know is to do g.setClip (…) and then g.drawImage(). But then I have create a compatible Graphics object from g, as to not screw up the original clipping area. I think that might slow things down…
Which way is faster?
from, Stefan