getting the right image observer for rotating an image
问题 So Im drawing a BufferedImage 'bird' but I want to rotate it according to the angle that it is falling. I have a bird object which contains the BufferedImage and a render() method which draw it rotated. public void render(Graphics2D g, ImageObserver io) { double theta = Math.tan((height - pastHeight) / .875); System.out.println(theta); Graphics2D g2 = (Graphics2D) bird.getGraphics(); g2.drawImage(bird, 100, (int) height, null); g2.rotate(theta); g2.drawImage(bird, 100, (int) height, io); } I