Examples of ImageSessionContext


Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

        int y = origin.y + posInt.y;
       
        ImageManager manager = getUserAgent().getFactory().getImageManager();
        ImageInfo info = null;
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            info = manager.getImageInfo(uri, sessionContext);
           
            //Only now fully load/prepare the image
            Map hints = ImageUtil.getDefaultHints(sessionContext);
            org.apache.xmlgraphics.image.loader.Image img = manager.getImage(
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

        this.imageManager = new ImageManager(new DefaultImageContext());
    }
   
    public void display(File f) throws IOException {
        //The ImageSessionContext might for each processing run
        ImageSessionContext sessionContext = new DefaultImageSessionContext(
                this.imageManager.getImageContext(), null);
       
        //Construct URI from filename
        String uri = f.toURI().toASCIIString();
       
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

     * Tests the ImageInfo cache.
     * @throws Exception if an error occurs
     */
    public void testImageInfoCache() throws Exception {

        ImageSessionContext sessionContext = imageContext.newSessionContext();
        ImageManager manager = imageContext.getImageManager();
       
        String invalid1 = "invalid1.jpg";
        String invalid2 = "invalid2.jpg";
        String valid1 = "bgimg300dpi.bmp";
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

    /**
     * Tests the image cache reusing a cacheable Image created by the ImageLoader.
     * @throws Exception if an error occurs
     */
    public void testImageCache1() throws Exception {
        ImageSessionContext sessionContext = imageContext.newSessionContext();
        ImageManager manager = imageContext.getImageManager();
       
        String valid1 = "bgimg72dpi.gif";
       
        ImageCacheStatistics statistics = new ImageCacheLoggingStatistics(true);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

     * Tests the image cache reusing a cacheable Image created by one of the ImageConverters in
     * a converter pipeline.
     * @throws Exception if an error occurs
     */
    public void DISABLEDtestImageCache2() throws Exception {
        ImageSessionContext sessionContext = imageContext.newSessionContext();
        ImageManager manager = imageContext.getImageManager();
       
        String valid1 = "test/resources/images/img-w-size.svg";
       
        ImageCacheStatistics statistics = new ImageCacheLoggingStatistics(true);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

        }
       
        ImageManager manager = getUserAgent().getFactory().getImageManager();
        ImageInfo info = null;
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            info = manager.getImageInfo(uri, sessionContext);
            int width = (int)pos.getWidth();
            int height = (int)pos.getHeight();
           
            //millipoints --> points for PostScript
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

                        if (uri != null) {
                            bkg.setURL(uri);

                            try {
                                ImageManager manager = userAgent.getFactory().getImageManager();
                                ImageSessionContext sessionContext
                                    = userAgent.getImageSessionContext();
                                ImageInfo info = manager.getImageInfo(uri, sessionContext);
                                bkg.setImageInfo(info);
                            } catch (Exception e) {
                                log.error("Background image not available: " + uri, e);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

            final String uri = form.getImageURI();
           
            ImageManager manager = userAgent.getFactory().getImageManager();
            ImageInfo info = null;
            try {
                ImageSessionContext sessionContext = userAgent.getImageSessionContext();
                info = manager.getImageInfo(uri, sessionContext);
               
                ImageFlavor[] flavors;
                if (gen.getPSLevel() >= 3) {
                    flavors = LEVEL_3_FLAVORS_FORM;
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

    protected GraphicsNode createImageGraphicsNode
                (BridgeContext ctx, Element imageElement, ParsedURL purl) {
        PDFBridgeContext pdfCtx = (PDFBridgeContext)ctx;
       
        ImageManager manager = pdfCtx.getImageManager();
        ImageSessionContext sessionContext = pdfCtx.getImageSessionContext();
        try {
            ImageInfo info = manager.getImageInfo(purl.toString(), sessionContext);
            Image image = manager.getImage(info, supportedFlavors, sessionContext);
           
            //TODO color profile overrides aren't handled, yet!
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSessionContext

        uri = URISpecification.getURL(uri);
       
        ImageManager manager = getUserAgent().getFactory().getImageManager();
        ImageInfo info = null;
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            info = manager.getImageInfo(uri, sessionContext);
            final ImageFlavor[] flavors = new ImageFlavor[]
                {ImageFlavor.GRAPHICS2D,
                    ImageFlavor.BUFFERED_IMAGE,
                    ImageFlavor.RENDERED_IMAGE,
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.