-4

please how I can rotate image easiest way?

My Image:

 g.drawImage(image, x, y, this);
  • 3
    See here [Rotating images](http://stackoverflow.com/questions/8639567/java-rotating-images). – Stefan Apr 28 '13 at 14:18

1 Answers1

1
Graphics2D g2d=(Graphics2D)g;       // Create a Java2D version of g.
g2d.translate(170, 0);              // Translate the center of our coordinates.
g2d.rotate(1);                      // Rotate the image by 1 radian.
g2d.drawImage(image, 0, 0, 200, 200, this);

Source: Rotate Image

Alex
  • 10,470
  • 8
  • 40
  • 62
Ash..
  • 1
  • 5