I'm using following code for rotate my image
public class Field extends Canvas implements ActionListener {
@Override
public void paint(Graphics grphcs) {
super.paint(grphcs);
Graphics2D g2d = (Graphics2D) grphcs;
AffineTransform affine = new AffineTransform();
int angle = car.getAngle();
Image image = car.getCarImage();
int x = (int) car.getX();
int y = (int) car.getY();
affine.rotate(Math.toRadians(angle), x + image.getWidth(null) / 2,
y + image.getHeight(null) / 2);
g2d.setTransform(affine);
g2d.drawImage(image, x, y, null);
}
....
if angle equals, for example, 5 image quality is lost.
What's the problem?