public void picture(double x,double y,String s){
  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.drawImage(image,(int)Math.round(xs - ws / 2.0),(int)Math.round(ys - hs / 2.0),null);
  draw();
}

public void picture ( double x , double y , String s ) { 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 . drawImage ( image , ( int ) Math . round ( xs - ws / 2.0 ) , ( int ) Math . round ( ys - hs / 2.0 ) , null ) ; draw ( ) ; }
draws picture ( gif , jpg , or png ) centered on ( x , y ) .
