Examples of SVGUserAgent


Examples of org.apache.fop.svg.SVGUserAgent

        if (log.isDebugEnabled()) {
            log.debug("Generating SVG at " + deviceResolution + "dpi.");
        }

        final float uaResolution = userAgent.getSourceResolution();
        SVGUserAgent ua = new SVGUserAgent(userAgent, new AffineTransform());

        //Scale for higher resolution on-the-fly images from Batik
        double s = uaResolution / deviceResolution;
        AffineTransform resolutionScaling = new AffineTransform();
        resolutionScaling.scale(s, s);
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

                SVGDocument doc = (SVGDocument) factory.createSVGDocument(uri, fis);
                info.data = doc;

                Element e = doc.getRootElement();
                String s;
                SVGUserAgent userAg = new SVGUserAgent(pixelUnitToMM,
                            new AffineTransform());
                BridgeContext ctx = new BridgeContext(userAg);
                UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e);

                // 'width' attribute - default is 100%
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        }

        private ImageInfo createImageInfo(String uri, ImageContext context, SVGDocument doc) {
            Element e = doc.getRootElement();
            float pxUnitToMillimeter = UnitConv.IN2MM / context.getSourceResolution();
            SVGUserAgent userAg = new SVGUserAgent(pxUnitToMillimeter,
                        new AffineTransform());
            BridgeContext ctx = new BridgeContext(userAg);
            UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e);

            String s;
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        float pxToMillimeter = UnitConv.IN2MM / 72; //default: 72dpi
        Number ptm = (Number)hints.get(ImageProcessingHints.SOURCE_RESOLUTION);
        if (ptm != null) {
            pxToMillimeter = (float)(UnitConv.IN2MM / ptm.doubleValue());
        }
        SVGUserAgent ua = new SVGUserAgent(
                pxToMillimeter,
                new AffineTransform());
        GVTBuilder builder = new GVTBuilder();
        final BridgeContext ctx = new BridgeContext(ua);
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        Configuration cfg = psInfo.getHandlerConfiguration();
        if (cfg != null) {
            strokeText = cfg.getChild("stroke-text", true).getValueAsBoolean(strokeText);
        }

        SVGUserAgent ua
             = new SVGUserAgent(
                context.getUserAgent().getSourcePixelUnitToMillimeter(),
                new AffineTransform());

        PSGraphics2D graphics = new PSGraphics2D(strokeText, gen);
        graphics.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        final RendererContextWrapper wrappedContext = RendererContext.wrapRendererContext(context);
        int x = wrappedContext.getCurrentXPosition();
        int y = wrappedContext.getCurrentYPosition();

        //Prepare
        SVGUserAgent ua = new SVGUserAgent(
                context.getUserAgent().getSourcePixelUnitToMillimeter(),
                new AffineTransform());
        GVTBuilder builder = new GVTBuilder();
        final BridgeContext ctx = new BridgeContext(ua);
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

       
        int x = info.currentXPosition;
        int y = info.currentYPosition;
       
        float ptom = context.getUserAgent().getSourcePixelUnitToMillimeter();
        SVGUserAgent ua = new SVGUserAgent(ptom, new AffineTransform());
       
        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(ua);
       
        GraphicsNode root;
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        float pxToMillimeter = (float)UnitConv.mm2in(72); //default: 72dpi
        Number ptm = (Number)hints.get(ImageProcessingHints.SOURCE_RESOLUTION);
        if (ptm != null) {
            pxToMillimeter = (float)UnitConv.mm2in(ptm.doubleValue());
        }
        SVGUserAgent ua = new SVGUserAgent(
                pxToMillimeter,
                new AffineTransform());
        GVTBuilder builder = new GVTBuilder();
        final BridgeContext ctx = new BridgeContext(ua);
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        }

        private ImageInfo createImageInfo(String uri, ImageContext context, SVGDocument doc) {
            Element e = doc.getRootElement();
            float pxUnitToMillimeter = 25.4f / context.getSourceResolution();
            SVGUserAgent userAg = new SVGUserAgent(pxUnitToMillimeter,
                        new AffineTransform());
            BridgeContext ctx = new BridgeContext(userAg);
            UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e);

            String s;
View Full Code Here

Examples of org.apache.fop.svg.SVGUserAgent

        final float deviceResolution = userAgent.getTargetResolution();
        log.debug("Generating SVG at " + deviceResolution + "dpi.");
        log.debug("Generating SVG at " + deviceResolution + "dpi.");
       
        final float uaResolution = userAgent.getSourceResolution();
        SVGUserAgent ua = new SVGUserAgent(25.4f / uaResolution, new AffineTransform());

        //Scale for higher resolution on-the-fly images from Batik
        double s = uaResolution / deviceResolution;
        AffineTransform resolutionScaling = new AffineTransform();
        resolutionScaling.scale(s, s);
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.