public boolean copyImage(Image img,int dx,int dy,int sx,int sy,int width,int height,Color bgcolor,ImageObserver observer){
  try {
    return imagepipe.copyImage(this,img,dx,dy,sx,sy,width,height,bgcolor,observer);
  }
 catch (  InvalidPipeException e) {
    try {
      revalidateAll();
      return imagepipe.copyImage(this,img,dx,dy,sx,sy,width,height,bgcolor,observer);
    }
 catch (    InvalidPipeException e2) {
      return false;
    }
  }
 finally {
    surfaceData.markDirty();
  }
}

public boolean copyImage ( Image img , int dx , int dy , int sx , int sy , int width , int height , Color bgcolor , ImageObserver observer ) { try { return imagepipe . copyImage ( this , img , dx , dy , sx , sy , width , height , bgcolor , observer ) ; } catch ( InvalidPipeException e ) { try { revalidateAll ( ) ; return imagepipe . copyImage ( this , img , dx , dy , sx , sy , width , height , bgcolor , observer ) ; } catch ( InvalidPipeException e2 ) { return false ; } } finally { surfaceData . markDirty ( ) ; } }
not part of the advertised api but a useful utility method to call internally . this is for the case where we are drawing to / from given coordinates using a given width / height , but we guarantee that the surfacedata ' s width / height of the src and dest areas are equal ( no scale needed ) . note that this method intentionally ignore scale factor of the source image , and copy it as is .
