Package java.awt.image

Examples of java.awt.image.Raster.createCompatibleWritableRaster()


                        if(jpegRGBToYCbCr) {
                            WritableRaster wRas = null;
                            if(src instanceof WritableRaster) {
                                wRas = (WritableRaster)src;
                            } else {
                                wRas = src.createCompatibleWritableRaster();
                                wRas.setRect(src);
                            }

                            if (wRas.getMinX() != 0 || wRas.getMinY() != 0) {
                                wRas =
View Full Code Here


     *
     * @return A <code>Graphics2D</code> object.
     */
    private Graphics2D getBogusGraphics2D(boolean shouldCopyState) {
        Raster r =  tiledImage.getTile(tileXMinimum, tileYMinimum);
        WritableRaster wr = r.createCompatibleWritableRaster(1, 1);
        BufferedImage bi =
            new BufferedImage(colorModel, wr,
                              colorModel.isAlphaPremultiplied(), properties);

        Graphics2D bogusG2D = bi.createGraphics();
View Full Code Here

        Raster r = pc.getRaster(x, y, w, h);
        WritableRaster wr;
        if(r instanceof WritableRaster){
            wr = (WritableRaster) r;
        }else{
            wr = r.createCompatibleWritableRaster();
            wr.setRect(r);
        }
        Surface srcSurf = new ImageSurface(pc.getColorModel(), wr);
        blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                composite, null, mra);
View Full Code Here

                        if(jpegRGBToYCbCr) {
                            WritableRaster wRas = null;
                            if(src instanceof WritableRaster) {
                                wRas = (WritableRaster)src;
                            } else {
                                wRas = src.createCompatibleWritableRaster();
                                wRas.setRect(src);
                            }

                            if (wRas.getMinX() != 0 || wRas.getMinY() != 0) {
                                wRas =
View Full Code Here

 
  public void testRaster1(TestHarness harness)
  {
    harness.checkPoint("testRaster1()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(1, 1, new float[] {1});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_ZERO_FILL, null);
    dest = op.filter(src, dest);
    harness.check(dest.getSample(0, 0, 0), 1);
    harness.check(dest.getSample(1, 0, 0), 2);
View Full Code Here

   
  public void testRaster2(TestHarness harness)
  {
    harness.checkPoint("testRaster2()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(3, 3, new float[] {0,0,0,
                                              0,1,0,
                                              0,0,0});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_ZERO_FILL, null);
    dest = op.filter(src, dest);
View Full Code Here

 
  public void testRaster3(TestHarness harness)
  {
    harness.checkPoint("testRaster3()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(3, 3, new float[] {0.1f,0.2f,0.3f,
                                              0.4f,0.5f,0.6f,
                                              0.7f,0.8f,0.9f});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_NO_OP, null);
    dest = op.filter(src, dest);
View Full Code Here

 
  public void testRaster1(TestHarness harness)
  {
    harness.checkPoint("testRaster1()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
View Full Code Here

   
  public void testRaster2(TestHarness harness)
  {
    harness.checkPoint("testRaster2()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
    dest = op.filter(src, dest);
View Full Code Here

 
  public void testRaster3(TestHarness harness)
  {
    harness.checkPoint("testRaster3()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.