Examples of calcPixelsFromSize()


Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            Point2D csize = new Point2D.Float(-1, -1);
            Point2D intrinsicDimensions = child.getDimension(csize);
            size.setSizeInMillipoints(
                    (int)Math.round(intrinsicDimensions.getX() * 1000),
                    (int)Math.round(intrinsicDimensions.getY() * 1000));
            size.calcPixelsFromSize();
            info.setSize(size);

            ImageXMLDOM image = new ImageXMLDOM(info, doc, ns);

            FOUserAgent userAgent = ifo.getUserAgent();
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_SVG);
            ImageSize size = new ImageSize();
            size.setSizeInMillipoints(widthMpt, heightMpt);
            //Set the resolution to that of the FOUserAgent
            size.setResolution(context.getSourceResolution());
            size.calcPixelsFromSize();
            info.setSize(size);

            //The whole image had to be loaded for this, so keep it
            ImageXMLDOM xmlImage = new ImageXMLDOM(info,
                    doc, SVGDOMImplementation.SVG_NAMESPACE_URI);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            size.setSizeInMillipoints(
                    Math.round(width * 1000),
                    Math.round(height * 1000));
            //Set the resolution to that of the FOUserAgent
            size.setResolution(context.getSourceResolution());
            size.calcPixelsFromSize();
            info.setSize(size);

            //The whole image had to be loaded for this, so keep it
            Image image = new ImageXMLDOM(info, svgDoc,
                    svgDoc.getDocumentElement().getNamespaceURI());
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            size.setResolution(resHorz, resVert);
           
            width = (int)Math.round(UnitConv.mm2mpt(width / 100f));
            height = (int)Math.round(UnitConv.mm2mpt(height / 100f));
            size.setSizeInMillipoints(width, height);
            size.calcPixelsFromSize();
           
            return size;
        } finally {
            in.setByteOrder(oldByteOrder);
            in.reset();
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            ImageSize size = new ImageSize();
            size.setSizeInMillipoints(
                    (int)Math.round(bbox.getWidth() * 1000),
                    (int)Math.round(bbox.getHeight() * 1000));
            size.setResolution(context.getSourceResolution());
            size.calcPixelsFromSize();
            info.setSize(size);
            info.getCustomObjects().put(EPS_BOUNDING_BOX, bbox);
            return true;
        } finally {
            in.reset();
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

        Dimension dim = painter.getImageSize();
       
        ImageSize size = new ImageSize();
        size.setSizeInMillipoints(dim.width, dim.height);
        size.setResolution(imageManager.getImageContext().getSourceResolution());
        size.calcPixelsFromSize();
       
        ImageInfo info = new ImageInfo(null, null);
        info.setSize(size);
        return new ImageGraphics2D(info, painter);
    }
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            size.setSizeInMillipoints(
                    Math.round(width * 1000),
                    Math.round(height * 1000));
            //Set the resolution to that of the FOUserAgent
            size.setResolution(context.getSourceResolution());
            size.calcPixelsFromSize();
            info.setSize(size);

            //The whole image had to be loaded for this, so keep it
            Image image = new ImageXMLDOM(info, svgDoc,
                    svgDoc.getDocumentElement().getNamespaceURI());
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

                size.setSizeInMillipoints(
                        Math.round(base.getWidth() * 1000),
                        Math.round(base.getHeight() * 1000));
                //Set the resolution to that of the FOUserAgent
                size.setResolution(context.getSourceResolution());
                size.calcPixelsFromSize();
                info.setSize(size);

                Graphics2DImagePainter painter = new Graphics2DImagePainter() {

                    public Dimension getImageSize() {
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_SVG);
            ImageSize size = new ImageSize();
            size.setSizeInMillipoints(Math.round(width * 1000), Math.round(height * 1000));
            //Set the resolution to that of the FOUserAgent
            size.setResolution(context.getSourceResolution());
            size.calcPixelsFromSize();
            info.setSize(size);

            //The whole image had to be loaded for this, so keep it
            ImageXMLDOM xmlImage = new ImageXMLDOM(info,
                    doc, SVGDOMImplementation.SVG_NAMESPACE_URI);
View Full Code Here

Examples of org.apache.xmlgraphics.image.loader.ImageSize.calcPixelsFromSize()

            Point2D csize = new Point2D.Float(-1, -1);
            Point2D intrinsicDimensions = child.getDimension(csize);
            size.setSizeInMillipoints(
                    (int)Math.round(intrinsicDimensions.getX() * 1000),
                    (int)Math.round(intrinsicDimensions.getY() * 1000));
            size.calcPixelsFromSize();
            info.setSize(size);

            ImageXMLDOM image = new ImageXMLDOM(info, doc, ns);
           
            FOUserAgent userAgent = ifo.getUserAgent();
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.