Package org.apache.xmlgraphics.image.loader

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 (ImageException e) {
                                ResourceEventProducer eventProducer
View Full Code Here


        final String uri = form.getImageURI();

        ImageManager manager = userAgent.getFactory().getImageManager();
        ImageInfo info = null;
        try {
            ImageSessionContext sessionContext = userAgent.getImageSessionContext();
            info = manager.getImageInfo(uri, sessionContext);

            //Create a rendering context for form creation
            PSRenderingContext formContext = new PSRenderingContext(
                    userAgent, gen, fontInfo, true);
View Full Code Here

        ImageManager imageManager = userAgent.getFactory().getImageManager();

        SVGUserAgent svgUserAgent
            = new SVGUserAgent(userAgent, new AffineTransform());

        ImageSessionContext imageSessionContext = userAgent.getImageSessionContext();

        FontInfo fontInfo = g2d.getFontInfo();
        return new AFPBridgeContext(svgUserAgent, fontInfo, imageManager, imageSessionContext,
                new AffineTransform(), g2d);
    }
View Full Code Here

     * @throws IOException if there's an I/O error while loading the image
     */
    protected void drawImageUsingImageHandler(ImageInfo info, Rectangle rect)
                    throws ImageException, IOException {
        ImageManager manager = getFopFactory().getImageManager();
        ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
        ImageHandlerRegistry imageHandlerRegistry = getFopFactory().getImageHandlerRegistry();

        //Load and convert the image to a supported format
        RenderingContext context = createRenderingContext();
        Map hints = createDefaultImageProcessingHints(sessionContext);
View Full Code Here

     * @return the ImageInfo instance or null if there has been an error.
     */
    protected ImageInfo getImageInfo(String uri) {
        ImageManager manager = getFopFactory().getImageManager();
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            return manager.getImageInfo(uri, sessionContext);
        } catch (ImageException ie) {
            ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
                    getUserAgent().getEventBroadcaster());
            eventProducer.imageError(this, uri, ie, null);
View Full Code Here

     */
    protected void drawImageUsingURI(String uri, Rectangle rect) {
        ImageManager manager = getFopFactory().getImageManager();
        ImageInfo info = null;
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            info = manager.getImageInfo(uri, sessionContext);

            drawImageUsingImageHandler(info, rect);
        } catch (ImageException ie) {
            ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
View Full Code Here

            //Additional processing: preload image
            String uri = URISpecification.getURL(newInstance.backgroundImage);
            FObj fobj = pList.getFObj();
            FOUserAgent userAgent = pList.getFObj().getUserAgent();
            ImageManager manager = userAgent.getFactory().getImageManager();
            ImageSessionContext sessionContext = userAgent.getImageSessionContext();
            ImageInfo info;
            try {
                info = manager.getImageInfo(uri, sessionContext);
                newInstance.backgroundImageInfo = info;
            } catch (ImageException e) {
View Full Code Here

                        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 (ImageException e) {
                                ResourceEventProducer eventProducer
View Full Code Here

     * @throws IOException if there's an I/O error while loading the image
     */
    protected void drawImageUsingImageHandler(ImageInfo info, Rectangle rect)
                    throws ImageException, IOException {
        ImageManager manager = getFopFactory().getImageManager();
        ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
        ImageHandlerRegistry imageHandlerRegistry = getFopFactory().getImageHandlerRegistry();

        //Load and convert the image to a supported format
        RenderingContext context = createRenderingContext();
        Map hints = createDefaultImageProcessingHints(sessionContext);
View Full Code Here

     * @return the ImageInfo instance or null if there has been an error.
     */
    protected ImageInfo getImageInfo(String uri) {
        ImageManager manager = getFopFactory().getImageManager();
        try {
            ImageSessionContext sessionContext = getUserAgent().getImageSessionContext();
            return manager.getImageInfo(uri, sessionContext);
        } catch (ImageException ie) {
            ResourceEventProducer eventProducer = ResourceEventProducer.Provider.get(
                    getUserAgent().getEventBroadcaster());
            eventProducer.imageError(this, uri, ie, null);
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.loader.ImageSessionContext

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.