// Translate what will be at minX,minY to zero, zero
// which where java2d will think the real minX,minY is.
aff.preConcatenate(AffineTransform.getTranslateInstance
(-destPt.getX(), -destPt.getY()));
AffineTransformOp op = new AffineTransformOp(aff, hints);
BufferedImage srcBI, myBI;
ColorModel srcCM = src.getColorModel();
ColorModel myCM = getColorModel();
WritableRaster srcWR = (WritableRaster)srcRas;
// If the output buffer is not premultiplied in certain cases
// it fails to properly divide out the Alpha (it always does
// the affine on premultiplied data). We help it out by
// premultiplying for it.
srcCM = GraphicsUtil.coerceData(srcWR, srcCM, true);
srcBI = new BufferedImage(srcCM,
srcWR.createWritableTranslatedChild(0,0),
srcCM.isAlphaPremultiplied(), null);
myBI = new BufferedImage(myCM,wr.createWritableTranslatedChild(0,0),
myCM.isAlphaPremultiplied(), null);
op.filter(srcBI, myBI);
// if ((count % 40) == 0) {
// org.apache.batik.ImageDisplay.showImage("Src: " , srcBI);
// org.apache.batik.ImageDisplay.showImage("Dst: " , myBI);
// }