// Create source accessors.
RasterAccessor[] s = new RasterAccessor[numSources];
for(int i = 0; i < numSources; i++) {
if(sources[i] != null) {
RasterFormatTag formatTag =
new RasterFormatTag(sources[i].getSampleModel(),
formatTagID);
s[i] = new RasterAccessor(sources[i], destRect, formatTag,
null);
}
}
// Create dest accessor.
RasterAccessor d =
new RasterAccessor(dest, destRect,
new RasterFormatTag(dest.getSampleModel(),
formatTagID),
null);
// Create the alpha accessors.
RasterAccessor[] a = new RasterAccessor[numSources];
if(alphaRaster != null) {
for(int i = 0; i < numSources; i++) {
if(alphaRaster[i] != null) {
SampleModel alphaSM = alphaRaster[i].getSampleModel();
int alphaFormatTagID =
RasterAccessor.findCompatibleTag(null, alphaSM);
RasterFormatTag alphaFormatTag =
new RasterFormatTag(alphaSM, alphaFormatTagID);
a[i] = new RasterAccessor(alphaRaster[i], destRect,
alphaFormatTag,
sourceAlpha[i].getColorModel());
}
}