question: public void picture ( double x , double y , String s , double degrees ) { BufferedImage image = getImage ( s ) ; double xs = scaleX ( x ) ; double ys = scaleY ( y ) ; int ws = image . getWidth ( ) ; int hs = image . getHeight ( ) ; if ( ws < 0 || hs < 0 ) throw new IllegalArgumentException ( "image " + s + " is corrupt" ) ; offscreen . rotate ( Math . toRadians ( - degrees ) , xs , ys ) ; offscreen . drawImage ( image , ( int ) Math . round ( xs - ws / 2.0 ) , ( int ) Math . round ( ys - hs / 2.0 ) , null ) ; offscreen . rotate ( Math . toRadians ( + degrees ) , xs , ys ) ; draw ( ) ; }
target:  Draws picture (gif, jpg, or png) centered on (x, y), rotated given number of degrees.