Package org.apache.batik.bridge

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


        Document clonedDoc = BatikUtil.cloneSVGDocument(doc);

        GraphicsNode root;
        try {
            GVTBuilder builder = new GVTBuilder();
            root = builder.build(ctx, clonedDoc);
        } catch (Exception e) {
            SVGEventProducer eventProducer = SVGEventProducer.Provider.get(
                    context.getUserAgent().getEventBroadcaster());
            eventProducer.svgNotBuilt(this, e, getDocumentURI(doc));
            return;
View Full Code Here


      }

      BridgeContext ctx = new BridgeContext(userAgent);
      ctx.setDynamic(true);
      GVTBuilder builder = new GVTBuilder();
      rootNode = builder.build(ctx, document);
      documentSize = ctx.getDocumentSize();
    }
    catch (IOException e)
    {
      throw new JRRuntimeException(e);
View Full Code Here

        UserAgent userAgent = new UserAgentAdapter();
        DocumentLoader loader = new DocumentLoader(userAgent);
        BridgeContext ctx = new BridgeContext(userAgent, loader);
        ctx.setDynamicState(BridgeContext.DYNAMIC);
        GVTBuilder builder = new GVTBuilder();
        builder.build(ctx, doc);

        // image margin
        graphSheet.setMargin(MARGIN);

        //Dimension
View Full Code Here

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

            fireCompletedEvent(gvtRoot);
        } catch (InterruptedBridgeException e) {
            fireCancelledEvent();
        } catch (BridgeException e) {
View Full Code Here

        GVTBuilder builder = new GVTBuilder();
        BridgeContext ctx = new BridgeContext(userAgent);
        ctx.setDynamic(true);

        try {
            builder.build(ctx, doc);
            BaseScriptingEnvironment scriptEnvironment
                = new BaseScriptingEnvironment(ctx);
            scriptEnvironment.loadScripts();
            scriptEnvironment.dispatchSVGLoadEvent();
        } catch (Exception e){
View Full Code Here

        BridgeContext ctx = new BridgeContext(userAgent, rc);
        PDFAElementBridge pdfAElementBridge = new PDFAElementBridge();
        ctx.putBridge(pdfAElementBridge);
        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

                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

            result.setBackgroundEnable(r);
        }

        SVGSVGElement svgElement = imgDocument.getRootElement();
        GVTBuilder builder = new GVTBuilder();
        GraphicsNode node = builder.build(ctx, imgDocument);
        // HACK: remove the clip set by the SVGSVGElement as the overflow
        // and clip properties must be ignored. The clip will be set later
        // using the overflow and clip of the <image> element.
        node.setClip(null);
        result.getChildren().add(node);
View Full Code Here

             BaseScriptingEnvironment.isDynamicDocument(svgDoc));
        ctx.setDynamic(isDynamic);

        GraphicsNode gvtRoot;
        try {
            gvtRoot = builder.build(ctx, svgDoc);
            // dispatch an 'onload' event if needed
            if (ctx.isDynamic()) {
                BaseScriptingEnvironment se = new BaseScriptingEnvironment(ctx);
                se.loadScripts();
                se.dispatchSVGLoadEvent();
View Full Code Here

             BaseScriptingEnvironment.isDynamicDocument(svgDoc));
        ctx.setDynamic(isDynamic);

        GraphicsNode gvtRoot;
        try {
            gvtRoot = builder.build(ctx, svgDoc);
            // dispatch an 'onload' event if needed
            if (ctx.isDynamic()) {
                BaseScriptingEnvironment se = new BaseScriptingEnvironment(ctx);
                se.loadScripts();
                se.dispatchSVGLoadEvent();
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.