Package java.awt.image

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


            int numBands = ras.getNumBands() - 1;
            int[] bandList = new int[numBands];
            for (int i = 0; i < numBands; i++) {
                bandList[i] = i;
            }
            ras = ras.createChild(0, 0,
                                  ras.getWidth(), ras.getHeight(),
                                  0, 0,
                                  bandList);
        }
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

            srcx -= dstx;
            srcy -= dsty;
            while (si.nextSpan(span)) {
                int w = span[2] - span[0];
                int h = span[3] - span[1];
                srcRas = srcRas.createChild(srcx + span[0], srcy + span[1],
                                            w, h, 0, 0, null);
                dstRas = dstRas.createWritableChild(span[0], span[1],
                                                    w, h, 0, 0, null);
                ctx.compose(srcRas, dstRas, dstRas);
            }
View Full Code Here

    // //
    if (src.getNumXTiles() == 1 && src.getNumYTiles() == 1) {
      final int minTileX = src.getMinTileX();
      final int minTileY = src.getMinTileY();
      final Raster sourceR = src.getTile(minTileX, minTileY);
      rasterOp.filter(sourceR.createChild(src.getMinX(), src.getMinY(),
          src.getWidth(), src.getHeight(), 0, 0, null), destWr);
      return dest;
    }

    // //
View Full Code Here

            if (noTransform) {
                Raster ras = src.getTile(tileX, tileY);
                if (noSubband)
                    return ras;
                else {
                    return ras.createChild(sx, sy, tileWidth, tileHeight,
                                           sx, sy, sourceBands);
                }
            }

            WritableRaster ras = Raster.createWritableRaster(sm, new Point(sx, sy));
View Full Code Here

            raster = im.getTile(im.getMinTileX(), im.getMinTileY());

            // Ensure result has requested coverage.
            Rectangle bounds = raster.getBounds();
            if (!bounds.equals(region)) {
                raster = raster.createChild(region.x, region.y,
                                            region.width, region.height,
                                            region.x, region.y,
                                            null);
            }
        } else {
View Full Code Here

            int numBands = ras.getNumBands() - 1;
            int[] bandList = new int[numBands];
            for (int i = 0; i < numBands; i++) {
                bandList[i] = i;
            }
            ras = ras.createChild(0, 0,
                                  ras.getWidth(), ras.getHeight(),
                                  0, 0,
                                  bandList);
        }
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[] bandList = new int[numBands];
      for (int i = 0; i < numBands; i++)
      {
        bandList[i] = i;
      }
      ras = ras.createChild(0, 0, ras.getWidth(), ras.getHeight(), 0, 0,
          bandList);
    }

    if (interlace)
    {
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.