public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) {
waitForImage(img);
double scalex = width/(double)img.getWidth(observer);
double scaley = height/(double)img.getHeight(observer);
AffineTransform tx = AffineTransform.getTranslateInstance(x,y);
tx.scale(scalex,scaley);
return drawImage(img, null, tx, bgcolor, observer);
}
/**
* @see Graphics#drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)