Package java.awt.image.renderable

Examples of java.awt.image.renderable.RenderContext


        // Get our sources image...
        // System.out.println("UnOpt: " + filter);
        AffineTransform at = g2d.getTransform();
        RenderedImage ri = filter.createRendering
            (new RenderContext(at, g2d.getClip(), g2d.getRenderingHints()));

        if (ri == null)
            return;

        g2d.setTransform(IDENTITY);
View Full Code Here


        float sX = w/getWidth();
        float sY = h/getHeight();
        float scale = Math.min(sX, sY);

        AffineTransform at = AffineTransform.getScaleInstance(scale, scale);
        RenderContext rc = new RenderContext(at, hints);

        float dX = (getWidth()*scale)-w;
        float dY = (getHeight()*scale)-h;

        RenderedImage ri = createRendering(rc);
View Full Code Here

        // We only want it's alpha channel...
        rh.put(FilterAsAlphaRable.KEY_COLORSPACE,
               FilterAsAlphaRable.VALUE_COLORSPACE_ALPHA);

        RenderedImage ri;
        ri = getSource().createRendering(new RenderContext(at, aoi, rh));
       
        if(ri == null){
            return null;
        }
View Full Code Here

        // update the current affine transform
        AffineTransform at = rc.getTransform();
        at.concatenate(affine);

        // Return what our input creates (it should factor in our affine).
        return getSource().createRendering(new RenderContext(at, aoi, rh));
    }
View Full Code Here

        AffineTransform resAt = new AffineTransform(sx/scaleX, shy/scaleX,
                                                    shx/scaleY, sy/scaleY,
                                                    tx, ty);

        RenderedImage ri;
        ri = getSource().createRendering(new RenderContext(srcAt, r, rh));
        if (ri == null)
            return null;

        // org.apache.batik.test.gvt.ImageDisplay.printImage
        //     ("Padded Image", ri,
View Full Code Here

        g2d.setPaint(Color.white);
        g2d.fill(devShape);
        g2d.dispose();

        RenderedImage ri;
        ri = getSource().createRendering(new RenderContext(usr2dev, rect, rh));

        CachableRed cr, clipCr;
        cr = RenderedImageCachableRed.wrap(ri);
        clipCr = new BufferedImageCachableRed(bi, devR.x, devR.y);
        CachableRed ret = new MultiplyAlphaRed(cr, clipCr);
View Full Code Here

        float yscale = 100f/src.getHeight();

        if (scale > yscale) scale=yscale;
       
        AffineTransform at = AffineTransform.getScaleInstance(scale, scale);
        rc = new RenderContext(at, rc.getRenderingHints());
        RenderedImage histRI = getSource().createRendering(rc);

        histo = new HistogramRed(convertSourceCS(histRI)).getHistogram();

        int t = (int)(histRI.getWidth()*histRI.getHeight()*trim+0.5);
 
View Full Code Here

            Rectangle2D.intersect(aoiR, bounds2d, aoiR);
        }

        Rectangle devRect = at.createTransformedShape(aoiR).getBounds();

        rc = new RenderContext(at, aoiR, rh);

        Vector srcs = new Vector();

        Iterator i = getSources().iterator();
        while (i.hasNext()) {
View Full Code Here

        if (destCS == ColorSpace.getInstance(ColorSpace.CS_sRGB))
            tileRable.setColorSpaceLinear(false);
        else if (destCS == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
            tileRable.setColorSpaceLinear(true);

        RenderContext rc = new RenderContext(usr2dev,  EVERYTHING, hints);
        tiled = tileRable.createRendering(rc);
        // System.out.println("tileRed: " + tiled);
        // org.apache.batik.test.gvt.ImageDisplay.showImage("Tiled: ", tiled);

        //System.out.println("Created rendering");
View Full Code Here

        resUsr2Dev = AffineTransform.getScaleInstance(resScale, resScale);
       
        //
        // Create a new RenderingContext
        //
        RenderContext newRC = new RenderContext(resUsr2Dev, null, hints);

        ret = getSource().createRendering(newRC);

        // This is probably justified since the whole reason to use
        // The filterRes attribute is because the filter chain is
View Full Code Here

TOP

Related Classes of java.awt.image.renderable.RenderContext

Copyright © 2018 www.massapicom. 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.