Examples of AFPImageHandlerRenderedImage


Examples of org.apache.fop.render.afp.AFPImageHandlerRenderedImage

        x = toMillipointFactor * x;
        y = toMillipointFactor * y;
        double w = toMillipointFactor * imgWidth * gat.getScaleX();
        double h = toMillipointFactor * imgHeight * -gat.getScaleY();

        AFPImageHandlerRenderedImage handler = new AFPImageHandlerRenderedImage();
        ImageInfo imageInfo = new ImageInfo(null, null);
        imageInfo.setSize(new ImageSize(
                img.getWidth(), img.getHeight(), paintingState.getResolution()));
        imageInfo.getSize().calcSizeFromPixels();
        ImageRendered red = new ImageRendered(imageInfo, img, null);
        Rectangle targetPos = new Rectangle(
                (int)Math.round(x),
                (int)Math.round(y),
                (int)Math.round(w),
                (int)Math.round(h));
        AFPRenderingContext context = new AFPRenderingContext(null,
                resourceManager, paintingState, fontInfo, null);
        try {
            handler.handleImage(context, red, targetPos);
        } catch (IOException ioe) {
            handleIOException(ioe);
        }
    }
View Full Code Here

Examples of org.apache.fop.render.afp.AFPImageHandlerRenderedImage

        x = toMillipointFactor * x;
        y = toMillipointFactor * y;
        double w = toMillipointFactor * imgWidth * gat.getScaleX();
        double h = toMillipointFactor * imgHeight * -gat.getScaleY();

        AFPImageHandlerRenderedImage handler = new AFPImageHandlerRenderedImage();
        ImageInfo imageInfo = new ImageInfo(null, null);
        imageInfo.setSize(new ImageSize(
                img.getWidth(), img.getHeight(), paintingState.getResolution()));
        imageInfo.getSize().calcSizeFromPixels();
        ImageRendered red = new ImageRendered(imageInfo, img, null);
        Rectangle targetPos = new Rectangle(
                (int)Math.round(x),
                (int)Math.round(y),
                (int)Math.round(w),
                (int)Math.round(h));
        AFPRenderingContext context = new AFPRenderingContext(null,
                resourceManager, paintingState, fontInfo, null);
        try {
            handler.handleImage(context, red, targetPos);
        } catch (IOException ioe) {
            handleIOException(ioe);
        }
    }
View Full Code Here

Examples of org.apache.fop.render.afp.AFPImageHandlerRenderedImage

        x = toMillipointFactor * x;
        y = toMillipointFactor * y;
        double w = toMillipointFactor * imgWidth * gat.getScaleX();
        double h = toMillipointFactor * imgHeight * -gat.getScaleY();

        AFPImageHandlerRenderedImage handler = new AFPImageHandlerRenderedImage();
        ImageInfo imageInfo = new ImageInfo(null, null);
        imageInfo.setSize(new ImageSize(
                img.getWidth(), img.getHeight(), paintingState.getResolution()));
        imageInfo.getSize().calcSizeFromPixels();
        ImageRendered red = new ImageRendered(imageInfo, img, null);
        Rectangle targetPos = new Rectangle(
                (int)Math.round(x),
                (int)Math.round(y),
                (int)Math.round(w),
                (int)Math.round(h));
        AFPRenderingContext context = new AFPRenderingContext(null,
                resourceManager, paintingState, fontInfo, null);
        try {
            handler.handleImage(context, red, targetPos);
        } catch (IOException ioe) {
            handleIOException(ioe);
        }
    }
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.