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 = convertYToTileY(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

    Raster rst = createRaster(harness);

    // Width and height out of bounds
    try
    {
      rst.createChild(10, 20, 100, 100, 0, 0, null);
      harness.check(false);
    }
    catch (RasterFormatException ex)
    {
      harness.check(true);
View Full Code Here

    {
      // Create child with non-zero minX and minY
      Raster rst2 = rst.createChild(0, 0, 25, 25, 30, 30, null);
     
      // Create child's child with minX and minY out of bounds
      rst2.createChild(10, 20, 10, 10, 0, 0, null);
      harness.check(false);
    }
    catch (RasterFormatException ex)
    {
      harness.check(true);
View Full Code Here

    Raster rst = createRaster(harness);

    // Width and height out of bounds
    try
    {
      rst.createChild(10, 20, 100, 100, 0, 0, null);
      harness.check(false);
    }
    catch (RasterFormatException ex)
    {
      harness.check(true);
View Full Code Here

    {
      // Create child with non-zero minX and minY
      Raster rst2 = rst.createChild(0, 0, 25, 25, 30, 30, null);
     
      // Create child's child with minX and minY out of bounds
      rst2.createChild(10, 20, 10, 10, 0, 0, null);
      harness.check(false);
    }
    catch (RasterFormatException ex)
    {
      harness.check(true);
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

        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 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

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.