java.awt.image.ShortLookupTable#java.awt.image.RasterOp源码实例Demo

下面列出了java.awt.image.ShortLookupTable#java.awt.image.RasterOp 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_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);
    }
}
 
源代码2 项目: TencentKona-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);
    }
}
 
源代码3 项目: jdk8u60   文件: 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);
    }
}
 
源代码4 项目: openjdk-jdk8u   文件: 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);
    }
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: 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);
    }
}
 
源代码6 项目: openjdk-jdk9   文件: 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);
    }
}
 
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
    }
 
源代码8 项目: 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);
    }
}
 
源代码9 项目: hottub   文件: 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);
    }
}
 
源代码10 项目: openjdk-8-source   文件: 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);
    }
}
 
源代码11 项目: openjdk-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);
    }
}
 
源代码12 项目: 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);
    }
}
 
源代码13 项目: 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);
    }
}
 
源代码14 项目: 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);
    }
}
 
源代码15 项目: dragonwell8_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;
}
 
源代码16 项目: TencentKona-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;
}
 
源代码17 项目: jdk8u60   文件: 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;
}
 
源代码18 项目: openjdk-jdk8u   文件: 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;
}
 
源代码19 项目: openjdk-jdk8u-backup   文件: 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;
}
 
源代码20 项目: Bytecoder   文件: 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;
}
 
源代码21 项目: openjdk-jdk9   文件: 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;
}
 
源代码22 项目: 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;
}
 
源代码23 项目: hottub   文件: 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;
}
 
源代码24 项目: openjdk-8-source   文件: 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;
}
 
源代码25 项目: openjdk-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;
}
 
源代码26 项目: 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;
}
 
源代码27 项目: 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;
}
 
源代码28 项目: 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;
}