Package java.awt.image

Examples of java.awt.image.WritableRaster.createWritableChild()


                           updateXStep, updateYStep,
                           destinationBands);

        // Handle source and destination bands
        if (sourceBands != null) {
            passRow = passRow.createWritableChild(0, 0,
                                                  passRow.getWidth(), 1,
                                                  0, 0,
                                                  sourceBands);
        }
        if (destinationBands != null) {
View Full Code Here


            updateXStep == 1 &&
            !adjustBitDepths &&
            (imRas instanceof ByteInterleavedRaster);

        if (useSetRect) {
            passRow = passRow.createWritableChild(srcX, 0,
                                                  updateWidth, 1,
                                                  0, 0,
                                                  null);
        }
View Full Code Here

/*     */       }
/*     */
/* 358 */       WritableRaster d = dest;
/* 359 */       if ((d.getMinX() != destRect.x) || (d.getMinY() != destRect.y) || (d.getWidth() != destRect.width) || (d.getHeight() != destRect.height))
/*     */       {
/* 363 */         d = d.createWritableChild(destRect.x, destRect.y, destRect.width, destRect.height, destRect.x, destRect.y, null);
/*     */       }
/*     */
/* 369 */       this.colorConvertOp.filter(s, d);
/*     */     }
/*     */     else
View Full Code Here

/* 1044 */             if ((this.bandList == null) && (rect.equals(tileRect)))
/*      */             {
/* 1048 */               if (tileRect.equals(tile.getBounds()))
/* 1049 */                 src.copyData(tile);
/*      */               else {
/* 1051 */                 src.copyData(tile.createWritableChild(rect.x, rect.y, rect.width, rect.height, rect.x, rect.y, null));
/*      */               }
/*      */
/*      */             }
/*      */             else
/*      */             {
View Full Code Here

/* 1133 */       return this.tiles[(tileX - this.minTileX)][(tileY - this.minTileY)];
/*      */     }
/*      */
/* 1137 */     WritableRaster wr = this.tiles[(tileX - this.minTileX)][(tileY - this.minTileY)];
/*      */
/* 1139 */     return wr.createWritableChild(wr.getMinX(), wr.getMinY(), wr.getWidth(), wr.getHeight(), wr.getMinX(), wr.getMinY(), this.bandList);
/*      */   }
/*      */
/*      */   public void releaseWritableTile(int tileX, int tileY)
/*      */   {
/* 1154 */     if (isTileLocked(tileX, tileY)) {
View Full Code Here

            WritableRaster wr = Raster.createPackedRaster(dataBuffer, alignedWidth, height, 1, null);

            byte[] blackWhite = new byte[]{0, (byte)0xff};
            IndexColorModel colorModel = new IndexColorModel(1, 2, blackWhite, blackWhite, blackWhite);

            this.image = new BufferedImage(colorModel, wr.createWritableChild(0, 0, width, height, 0, 0, null), false, null);
        }

        return this.image;
    }
   
View Full Code Here

                WritableRaster dstWr;
                dstWr = Raster.createWritableRaster(dstSMNoA,
                                                    wr.getDataBuffer(),
                                                    new Point(0,0));
                dstWr = dstWr.createWritableChild
                    (wr.getMinX()-wr.getSampleModelTranslateX(),
                     wr.getMinY()-wr.getSampleModelTranslateY(),
                     wr.getWidth(), wr.getHeight(),
                     0, 0, null);
View Full Code Here

            if (x0 < bounds.x) x0 = bounds.x;
            if (y0 < bounds.y) y0 = bounds.y;
            if (x1 >= (bounds.x+bounds.width))  x1 = bounds.x+bounds.width-1;
            if (y1 >= (bounds.y+bounds.height)) y1 = bounds.y+bounds.height-1;

            wr = wr.createWritableChild(x0, y0, x1-x0+1, y1-y0+1,
                                        x0, y0, null);
        }
        return wr;
    }
View Full Code Here

                WritableRaster dstWr;
                dstWr = Raster.createWritableRaster(smna,
                                                    wr.getDataBuffer(),
                                                    new Point(0,0));
                dstWr = dstWr.createWritableChild
                    (wr.getMinX()-wr.getSampleModelTranslateX(),
                     wr.getMinY()-wr.getSampleModelTranslateY(),
                     wr.getWidth(), wr.getHeight(),
                     0, 0, null);
               
View Full Code Here

     */
    public static WritableRaster copyRaster(Raster ras, int minX, int minY) {
        WritableRaster ret = Raster.createWritableRaster
            (ras.getSampleModel(),
             new Point(0,0));
        ret = ret.createWritableChild
            (ras.getMinX()-ras.getSampleModelTranslateX(),
             ras.getMinY()-ras.getSampleModelTranslateY(),
             ras.getWidth(), ras.getHeight(),
             minX, minY, 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.