posted 14 years ago
In a paintComponent method I'm calling g.drawImage several times, rotating some images with AffineTransform but not others, something like this, with object MyImage containing fields
boolean rotate; // true if image is to be rotated
x, y; // upper left position to place image
width, height; // of image
BufferedImage bi; // image itself
I understand that successive assignments of these transforms are cumulative, but (I'm new to this obviously) I don't want it to be here. What is the accepted method of "resetting" after each one? I see the createInverse method which I'm guessing is for other uses, not this. Is it necessary to use an AffineTransform instance static method? I've tried but with no success. Is it better to use a new graphics object?
Thanks for any input.