这个问题在这里已经有了答案:Java:RotatingImages(8个答案)关闭9年前。我已经设法将图像旋转180度但希望将其旋转90度顺时针方向有人可以编辑我的代码以便它可以旋转吗这有解释。谢谢。privatevoidrotateClockwise(){if(currentImage!=null){intwidth=currentImage.getWidth();intheight=currentImage.getHeight();OFImagenewImage=newOFImage(width,height);for(inty=0;y