Package org.apache.batik.bridge

Examples of org.apache.batik.bridge.GVTBuilder.build()


            ctx.putBridge(tBridge);
        }

        GraphicsNode root;
        try {
            root = builder.build(ctx, doc);
        } catch (Exception e) {
            log.error("SVG graphic could not be built: "
                                   + e.getMessage(), e);
            return;
        }
View Full Code Here


        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(ua);
       
        GraphicsNode root;
        try {
            root = builder.build(ctx, doc);
        } catch (Exception e) {
            log.error("SVG graphic could not be built: " + e.getMessage(), e);
            return;
        }
       
View Full Code Here

        }
       
        try {
            GVTBuilder builder = ctx.getGVTBuilder();
            GraphicsNode gn;
            gn = builder.build(ctx, srcElems[idx]);
            srcs[idx] = new SoftReference(gn);
            return gn;
        } catch (Exception ex) { ex.printStackTrace()}

        return null;
View Full Code Here

            if (bridgeContext.isDynamic()) {
                builder = new DynamicGVTBuilder();
            } else {
                builder = new GVTBuilder();
            }
            GraphicsNode gvtRoot = builder.build(bridgeContext, svgDocument);

            if (getBeenInterrupted()) {
                fireEvent(cancelledDispatcher, ev);
                return;
            }
View Full Code Here

                try {
                    System.out.println("Reading: " + files[i]);
                    Document svgDoc = loader.loadDocument
                        (files[i].toURL().toString());
                    System.out.println("Building: " + files[i]);
                    gvtRoot = builder.build(ctx, svgDoc);
                    System.out.println("Rendering: " + files[i]);
                    renderer.setTree(gvtRoot);

                    Element elt = ((SVGDocument)svgDoc).getRootElement();
                    renderer.setTransform
View Full Code Here

        final PDFAElementBridge aBridge = new PDFAElementBridge();
        ctx.putBridge(aBridge);

        GraphicsNode root;
        root = builder.build(ctx, svgDocument);
        ctx = null;
        builder = null;

        PDFGraphics2D graphics;
        try {
View Full Code Here

     * @return The Batik GraphicsNode.
     */
    protected GraphicsNode getGraphicsNode(final SVGDocument doc) {
        final BridgeContext ctx = makeBridgeContextAWT();
        final GVTBuilder builder = new GVTBuilder();
        return builder.build(ctx, doc);
    }

    /**
     * Creates a BridgeContext instance suitable for use by Batik when rendering
     * an SVG graphic in an AWT environment.
View Full Code Here

        }
        BridgeContext ctx = makeBridgeContext();
        GVTBuilder builder = new GVTBuilder();

        GraphicsNode root;
        root = builder.build(ctx, doc);
        ctx = null;
        builder = null;

        final PSGraphics2D graphics = new PSGraphics2D(false, cos, this.getLogger());
        graphics.setGraphicContext(new GraphicContext());
View Full Code Here

            //aBridge.setCurrentTransform(transform);
            //ctx.putBridge(aBridge);

            GraphicsNode root;
            try {
                root = builder.build(ctx, doc);
            } catch (Exception e) {
                log.error("SVG graphic could not be built: "
                                       + e.getMessage(), e);
                return;
            }
View Full Code Here

        ImageRendererFactory rendFactory = new StaticRendererFactory();
        GraphicsNodeRenderContext rc = rendFactory.getRenderContext();
        BridgeContext ctx = new BridgeContext(userAgent, rc);
        GraphicsNode gvtRoot;
        try {
            gvtRoot = builder.build(ctx, svgDoc);
        } catch (BridgeException ex) {
            throw new TranscoderException(ex);
        }
        // get the 'width' and 'height' attributes of the SVG document
        float docWidth = (float)ctx.getDocumentSize().getWidth();
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.