Java 类java.awt.image.RasterOp 实例源码

项目:OpenJSharp    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:jdk8u-jdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:openjdk-jdk10    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:openjdk-jdk10    文件:RasterOpNullDestinationRasterTest.java   
public static void main(String[] args) {

        byte[][] data = new byte[1][10];
        ByteLookupTable lut = new ByteLookupTable(0, data);
        RasterOp op = new LookupOp(lut, null);

        int[] bandOffsets = {0};
        Point location = new Point(0, 0);
        DataBuffer db = new DataBufferByte(10 * 10);
        SampleModel sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
                                                         10, 10, 1, 10,
                                                         bandOffsets);

        Raster src = Raster.createRaster(sm, db, location);

        op.filter(src, null); // this used to result in NullPointerException
    }
项目:openjdk9    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:jdk8u_jdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:infobip-open-jdk-8    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:jdk8u-dev-jdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:jdk7-jdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:openjdk-source-code-learn    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:OLD-OpenJDK8    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:openjdk-jdk7u-jdk    文件:ImageTests.java   
public void runTest(Object ctx, int numReps) {
    ImageOpTests.Context ictx = (ImageOpTests.Context)ctx;
    RasterOp op = ictx.rasterOp;
    Raster src = ictx.rasSrc;
    WritableRaster dst = ictx.rasDst;
    if (ictx.touchSrc) {
        Graphics gSrc = ictx.bufSrc.getGraphics();
        do {
            gSrc.fillRect(0, 0, 1, 1);
            op.filter(src, dst);
        } while (--numReps > 0);
    } else {
        do {
            op.filter(src, dst);
        } while (--numReps > 0);
    }
}
项目:OpenJSharp    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:OpenJSharp    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    return null;
}
项目:jdk8u-jdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:openjdk-jdk10    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:openjdk9    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:jdk8u_jdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:lookaside_java-1.8.0-openjdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:infobip-open-jdk-8    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:jdk8u-dev-jdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:jdk7-jdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:openjdk-source-code-learn    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:OLD-OpenJDK8    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:openjdk-jdk7u-jdk    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}
项目:openjdk-icedtea7    文件:ImagingLib.java   
public static WritableRaster filter(RasterOp op, Raster src,
                                    WritableRaster dst) {
    if (useLib == false) {
        return null;
    }

    // Create the destination tile
    if (dst == null) {
        dst = op.createCompatibleDestRaster(src);
    }


    WritableRaster retRaster = null;
    switch (getNativeOpIndex(op.getClass())) {

      case LOOKUP_OP:
        // REMIND: Fix this!
        LookupTable table = ((LookupOp)op).getTable();
        if (table.getOffset() != 0) {
            // Right now the native code doesn't support offsets
            return null;
        }
        if (table instanceof ByteLookupTable) {
            ByteLookupTable bt = (ByteLookupTable) table;
            if (lookupByteRaster(src, dst, bt.getTable()) > 0) {
                retRaster = dst;
            }
        }
        break;

      case AFFINE_OP:
        AffineTransformOp bOp = (AffineTransformOp) op;
        double[] matrix = new double[6];
        bOp.getTransform().getMatrix(matrix);
        if (transformRaster(src, dst, matrix,
                            bOp.getInterpolationType()) > 0) {
            retRaster =  dst;
        }
        break;

      case CONVOLVE_OP:
        ConvolveOp cOp = (ConvolveOp) op;
        if (convolveRaster(src, dst,
                           cOp.getKernel(), cOp.getEdgeCondition()) > 0) {
            retRaster = dst;
        }
        break;

      default:
        break;
    }

    if (retRaster != null) {
        SunWritableRaster.markDirty(retRaster);
    }

    return retRaster;
}