protected void computeRect(Raster[] sources,
                               WritableRaster dest,
                               Rectangle destRect) {
        /* For PointOpImage, srcRect = destRect. */
        RenderedImage[] renderedSources = 
               source2Alpha == null ? new RenderedImage[3] : 
                                      new RenderedImage[4];
        renderedSources[0] = getSourceImage(0);
        renderedSources[1] = getSourceImage(1);
        renderedSources[2] = source1Alpha;
        Raster source1AlphaRaster = source1Alpha.getData(destRect);
        Raster source2AlphaRaster = null;
        if (source2Alpha != null) {
            renderedSources[3] = source2Alpha;
            source2AlphaRaster = source2Alpha.getData(destRect);    
        }

        RasterFormatTag tags[] = 
            RasterAccessor.findCompatibleTags(renderedSources, this);
        RasterAccessor s1 = new RasterAccessor(sources[0], destRect, 
                                          tags[0],getSourceImage(0).getColorModel());
        RasterAccessor s2 = new RasterAccessor(sources[1], destRect, 
                                          tags[1],getSourceImage(1).getColorModel());
        RasterAccessor a1 = new RasterAccessor(source1AlphaRaster, 
                                               destRect, tags[2],
                                               source1Alpha.getColorModel());
        RasterAccessor a2=null,d=null;

        if (source2Alpha != null) {
            a2 = new RasterAccessor(source2AlphaRaster, destRect, 
                                    tags[3], source2Alpha.getColorModel());
            d = new RasterAccessor(dest, destRect,
                                   tags[4], this.getColorModel());
        } else {
            a2 = null;
            d = new RasterAccessor(dest, destRect, 
                                   tags[3], this.getColorModel());
        }

        switch (d.getDataType()) {
        case DataBuffer.TYPE_BYTE:
            byteLoop(s1, s2, a1, a2, d);
            break;
        case DataBuffer.TYPE_USHORT:
            ushortLoop(s1, s2, a1, a2, d);
            break;
        case DataBuffer.TYPE_SHORT:
            shortLoop(s1, s2, a1, a2, d);
            break;
        case DataBuffer.TYPE_INT:
            intLoop(s1, s2, a1, a2, d);
            break;
        case DataBuffer.TYPE_FLOAT:
            floatLoop(s1, s2, a1, a2, d);
            break;
        case DataBuffer.TYPE_DOUBLE:
            doubleLoop(s1, s2, a1, a2, d);
            break;
        }
        d.copyDataToRaster();
    }