Java Code Examples for java.awt.image.RasterOp#filter()
The following examples show how to use
java.awt.image.RasterOp#filter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
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); } }
Example 2
Source File: ImageTests.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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); } }
Example 3
Source File: ImageTests.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
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); } }
Example 4
Source File: ImageTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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); } }
Example 5
Source File: ImageTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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); } }
Example 6
Source File: ImageTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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); } }
Example 7
Source File: RasterOpNullDestinationRasterTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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 }
Example 8
Source File: ImageTests.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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); } }
Example 9
Source File: ImageTests.java From hottub with GNU General Public License v2.0 | 6 votes |
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); } }
Example 10
Source File: ImageTests.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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); } }
Example 11
Source File: ImageTests.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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); } }
Example 12
Source File: ImageTests.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
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); } }
Example 13
Source File: ImageTests.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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); } }
Example 14
Source File: ImageTests.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
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); } }