Package java.awt.image

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


            // image tile, the tile dimensions might differ from the
            // image dimensions.
            if (wRas.getMinX() != 0 || wRas.getMinY() != 0 ||
                wRas.getWidth() != im.getWidth() ||
                wRas.getHeight() != im.getHeight())
                wRas = wRas.createWritableChild(wRas.getMinX(),
                                                wRas.getMinY(),
                                                im.getWidth(),
                                                im.getHeight(),
                                                0, 0,
                                                null);
View Full Code Here


                                // the requested tile is completely within "src".
                                if (tileRect.equals(tile.getBounds()))
                                    src.copyData(tile);
                                else
                                    src.copyData(
                                        tile.createWritableChild(rect.x, rect.y,
                                                                 rect.width,
                                                                 rect.height,
                                                                 rect.x,
                                                                 rect.y,
                                                                 null));
View Full Code Here

        }

        // For sub-banded image return appropriate band subset.
        WritableRaster wr = tiles[tileX - minTileX][tileY - minTileY];

        return wr.createWritableChild(wr.getMinX(), wr.getMinY(),
                                      wr.getWidth(), wr.getHeight(),
                                      wr.getMinX(), wr.getMinY(),
                                      bandList);
    }
View Full Code Here

            WritableRaster d = dest;
            if (d.getMinX() != destRect.x ||
                d.getMinY() != destRect.y ||
                d.getWidth() != destRect.width ||
                d.getHeight() != destRect.height) {
                d = d.createWritableChild(destRect.x, destRect.y,
                                           destRect.width, destRect.height,
                                          destRect.x, destRect.y, null);
            }

            // Perform the color conversion on the (possible child) Rasters.
View Full Code Here

    public static WritableRaster copyRaster(Raster ras, int minX, int minY) {
        WritableRaster newSrcWR;
        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

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

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

     */
    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.