Examples of createWritableTranslatedChild()


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

                                wRas.setRect(src);
                            }

                            if (wRas.getMinX() != 0 || wRas.getMinY() != 0) {
                                wRas =
                                    wRas.createWritableTranslatedChild(0, 0);
                            }
                            BufferedImage bi =
                                new BufferedImage(colorModel, wRas,
                                                  false, null);
                            jpegEncoder.encode(bi);
View Full Code Here

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

            for(int tileX = minTileX; tileX <= maxTileX; tileX++) {
                int tileMinX = tiledImage.tileXToX(tileX);

                // Get the WritableRaster of the current tile
                WritableRaster wr = tiledImage.getWritableTile(tileX, tileY);
                wr = wr.createWritableTranslatedChild(0, 0);

                // Create an equivalent BufferedImage
                BufferedImage bi =
                    new BufferedImage(colorModel, wr,
                                      colorModel.isAlphaPremultiplied(),
View Full Code Here

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

            } else {
                java.awt.Graphics2D g2d = null;
                if (false) {
                    BufferedImage tmpBI = new BufferedImage
                        (workingOffScreen.getColorModel(),
                         copyRaster.createWritableTranslatedChild(0, 0),
                         workingOffScreen.isAlphaPremultiplied(), null);
                    g2d = GraphicsUtil.createGraphics(tmpBI);
                    g2d.translate(-copyRaster.getMinX(),
                                  -copyRaster.getMinY());
                }
View Full Code Here

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

                // If we push caching down the tree farther
                // Then this code path should probably try to
                // align with cr's tile grid to promote tile caching
                // (this of course will increase the memory required
                // in this path).
                cr.copyData(wr.createWritableTranslatedChild
                            (clipR.x, clipR.y));
                BufferedImage bi = new BufferedImage
                    (srcCM, wr, srcCM.isAlphaPremultiplied(), null);
               
                // Any of the drawImage calls that take an
View Full Code Here

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

            if (srcCM.hasAlpha())
                srcBICM = GraphicsUtil.coerceData(srcWr, srcCM, false);

            BufferedImage srcBI, dstBI;
            srcBI = new BufferedImage(srcCM,
                                      srcWr.createWritableTranslatedChild(0,0),
                                      false,
                                      null);
            ColorModel dstCM = getColorModel();
            if (!dstCM.hasAlpha()) {
                // No alpha ao we don't have to work around the bug
View Full Code Here

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

        if (imageInfo != null) {
            resourceContext.getPDFResources().addXObject(imageInfo);
        } else {
            Raster r = pctx.getRaster(devX, devY, devW, devH);
            WritableRaster wr = (WritableRaster)r;
            wr = wr.createWritableTranslatedChild(0, 0);

            ColorModel pcm = pctx.getColorModel();
            BufferedImage bi = new BufferedImage
                (pcm, wr, pcm.isAlphaPremultiplied(), null);
            final byte[] rgb  = new byte[devW * devH * 3];
 
View Full Code Here

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

        if (srcCM.hasAlpha())
            srcBICM = GraphicsUtil.coerceData(srcWr, srcCM, false);

        BufferedImage srcBI, dstBI;
        srcBI = new BufferedImage(srcBICM,
                                  srcWr.createWritableTranslatedChild(0,0),
                                  false,
                                  null);

        // System.out.println("src: " + srcBI.getWidth() + "x" +
        //                    srcBI.getHeight());
View Full Code Here

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

        srcWR = Raster.createWritableRaster(srcSM, new Point(wr.getMinX(),
                                                             wr.getMinY()));
        getSource().copyData(srcWR);

        BufferedImage srcBI = new BufferedImage
            (srcCM, srcWR.createWritableTranslatedChild(0,0),
             srcCM.isAlphaPremultiplied(), null);
        BufferedImage dstBI = new BufferedImage
            (cm, wr.createWritableTranslatedChild(0,0),
             cm.isAlphaPremultiplied(), null);
View Full Code Here

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

                srcWr = GraphicsUtil.makeRasterWritable(srcRas);
            }

            BufferedImage srcBI;
            srcBI = new BufferedImage(srcBICM,
                                      srcWr.createWritableTranslatedChild(0,0),
                                      false,
                                      null);

            /*
             * System.out.println("src: " + srcBI.getWidth() + "x" +
View Full Code Here

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

            } else {
                java.awt.Graphics2D g2d = null;
                if (false) {
                    BufferedImage tmpBI = new BufferedImage
                        (workingOffScreen.getColorModel(),
                         copyRaster.createWritableTranslatedChild(0, 0),
                         workingOffScreen.isAlphaPremultiplied(), null);
                    g2d = GraphicsUtil.createGraphics(tmpBI);
                    g2d.translate(-copyRaster.getMinX(),
                                  -copyRaster.getMinY());
                }
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.