Package org.apache.xmlgraphics.image.loader.impl

Examples of org.apache.xmlgraphics.image.loader.impl.ImageRawEPS


                    renderDocument(imgXML.getDocument(), imgXML.getRootNamespace(),
                            pos, foreignAttributes);
                } else if (img instanceof ImageRawStream) {
                    final ImageRawStream raw = (ImageRawStream)img;
                    if (raw instanceof ImageRawEPS) {
                        ImageRawEPS eps = (ImageRawEPS)raw;
                        Rectangle2D bbox = eps.getBoundingBox();
                        InputStream in = raw.createInputStream();
                        try {
                            PSImageUtils.renderEPS(in, uri,
                                    new Rectangle2D.Float(ptx, pty, ptw, pth),
                                    bbox,
View Full Code Here


                    throw new UnsupportedOperationException(
                            "Embedding an ImageXMLDOM as a form isn't supported, yet");
                } else if (img instanceof ImageRawStream) {
                    final ImageRawStream raw = (ImageRawStream)img;
                    if (raw instanceof ImageRawEPS) {
                        final ImageRawEPS eps = (ImageRawEPS)raw;
                        throw new UnsupportedOperationException(
                                "Embedding EPS as forms isn't supported, yet");
                        /*
                        InputStream in = eps.createInputStream();
                        try {
View Full Code Here

    /** {@inheritDoc} */
    public void handleImage(RenderingContext context, Image image, Rectangle pos)
                throws IOException {
        PSRenderingContext psContext = (PSRenderingContext)context;
        PSGenerator gen = psContext.getGenerator();
        ImageRawEPS eps = (ImageRawEPS)image;

        float x = (float)pos.getX() / 1000f;
        float y = (float)pos.getY() / 1000f;
        float w = (float)pos.getWidth() / 1000f;
        float h = (float)pos.getHeight() / 1000f;

        ImageInfo info = image.getInfo();
        Rectangle2D bbox = eps.getBoundingBox();
        if (bbox == null) {
            bbox = new Rectangle2D.Double();
            bbox.setFrame(new Point2D.Double(), info.getSize().getDimensionPt());
        }
        InputStream in = eps.createInputStream();
        try {
            String resourceName = info.getOriginalURI();
            if (resourceName == null) {
                resourceName = "inline image";
            }
View Full Code Here

TOP

Related Classes of org.apache.xmlgraphics.image.loader.impl.ImageRawEPS

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.