请问我如何旋转图像最简单方式?
我的形象:
g.drawImage(image, x, y, this);
答案 0 :(得分: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);
来源:Rotate Image