Package java.awt.image

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


/* 343 */     if ((!srcParam.isFloat()) && (!dstParam.isFloat()))
/*     */     {
/* 349 */       Raster s = src;
/* 350 */       if ((s.getMinX() != destRect.x) || (s.getMinY() != destRect.y) || (s.getWidth() != destRect.width) || (s.getHeight() != destRect.height))
/*     */       {
/* 354 */         s = s.createChild(destRect.x, destRect.y, destRect.width, destRect.height, destRect.x, destRect.y, null);
/*     */       }
/*     */
/* 358 */       WritableRaster d = dest;
/* 359 */       if ((d.getMinX() != destRect.x) || (d.getMinY() != destRect.y) || (d.getWidth() != destRect.width) || (d.getHeight() != destRect.height))
/*     */       {
View Full Code Here


/*  457 */       int numBands = ras.getNumBands() - 1;
/*  458 */       int[] bandList = new int[numBands];
/*  459 */       for (int i = 0; i < numBands; i++) {
/*  460 */         bandList[i] = i;
/*      */       }
/*  462 */       ras = ras.createChild(0, 0, ras.getWidth(), ras.getHeight(), 0, 0, bandList);
/*      */     }
/*      */
/*  468 */     if (this.interlace)
/*      */     {
/*  470 */       encodePass(dos, ras, 0, 0, 8, 8);
View Full Code Here

/*      */
/*  807 */         srcRect = srcTile.getBounds();
/*      */
/*  811 */         if (!dstRect.contains(srcRect)) {
/*  812 */           srcRect = dstRect.intersection(srcRect);
/*  813 */           srcTile = srcTile.createChild(srcTile.getMinX(), srcTile.getMinY(), srcRect.width, srcRect.height, srcRect.x, srcRect.y, null);
/*      */         }
/*      */
/*  823 */         JDKWorkarounds.setRect(dest, srcTile, 0, 0);
/*      */       }
/*  825 */       return dest;
View Full Code Here

/*     */   public Raster computeTile(int tileX, int tileY) {
/* 129 */     Raster tile = getSourceImage(0).getTile(tileX, tileY);
/*     */
/* 131 */     if (this.areDataCopied)
/*     */     {
/* 134 */       tile = tile.createChild(tile.getMinX(), tile.getMinY(), tile.getWidth(), tile.getHeight(), tile.getMinX(), tile.getMinY(), this.bandIndices);
/*     */
/* 138 */       WritableRaster raster = createTile(tileX, tileY);
/* 139 */       raster.setRect(tile);
/*     */
/* 141 */       return raster;
View Full Code Here

/* 139 */       raster.setRect(tile);
/*     */
/* 141 */       return raster;
/*     */     }
/*     */
/* 144 */     return tile.createChild(tile.getMinX(), tile.getMinY(), tile.getWidth(), tile.getHeight(), tile.getMinX(), tile.getMinY(), this.bandIndices);
/*     */   }
/*     */
/*     */   public Raster getTile(int tileX, int tileY)
/*     */   {
/* 153 */     return computeTile(tileX, tileY);
View Full Code Here

/* 1086 */       return this.tiles[(tileX - this.minTileX)][(tileY - this.minTileY)];
/*      */     }
/*      */
/* 1090 */     Raster r = this.tiles[(tileX - this.minTileX)][(tileY - this.minTileY)];
/*      */
/* 1092 */     return r.createChild(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight(), r.getMinX(), r.getMinY(), this.bandList);
/*      */   }
/*      */
/*      */   public WritableRaster getWritableTile(int tileX, int tileY)
/*      */   {
/* 1109 */     if ((tileX < this.minTileX) || (tileY < this.minTileY) || (tileX > getMaxTileX()) || (tileY > getMaxTileY()))
View Full Code Here

        int ty1 = getYTile(y0+wr.getHeight()-1);

        for (int y=ty0; y<=ty1; y++)
            for (int x=tx0; x<=tx1; x++) {
                Raster r = getTile(x, y);
                r = r.createChild(r.getMinX(),      r.getMinY(),
                                  r.getWidth(),     r.getHeight(),
                                  r.getMinX()+xOff, r.getMinY()+yOff, null);
                if (is_INT_PACK)
                    GraphicsUtil.copyData_INT_PACK(r, wr);
                else
View Full Code Here

        int endY = YToTileY(bounds.y + bounds.height - 1);
        Raster tile;

        if ((startX == endX) && (startY == endY)) {
            tile = getTile(startX, startY);
            return tile.createChild(bounds.x, bounds.y,
                                    bounds.width, bounds.height,
                                    bounds.x, bounds.y, null);
        } else {
            // Create a WritableRaster of the desired size
            SampleModel sm =
View Full Code Here

        int yt0 = getYTile(rect.y);
        int yt1 = getYTile(rect.y+rect.height-1);

        if ((xt0 == xt1) && (yt0 == yt1)) {
            Raster r = getTile(xt0, yt0);
            return r.createChild(rect.x, rect.y, rect.width, rect.height,
                                 rect.x, rect.y, null);
        }
        // rect crosses tile boundries...
        return super.getData(rect);
    }
View Full Code Here

        int endY = YToTileY(bounds.y + bounds.height - 1);
        Raster tile;

        if ((startX == endX) && (startY == endY)) {
            tile = getTile(startX, startY);
            return tile.createChild(bounds.x, bounds.y,
                                    bounds.width, bounds.height,
                                    bounds.x, bounds.y, null);
        } else {
            // Create a WritableRaster of the desired size
            SampleModel sm =
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.