Package org.apache.batik.bridge

Examples of org.apache.batik.bridge.DocumentLoader.loadDocument()


            DocumentLoader loader    = new DocumentLoader(userAgent);
            GVTBuilder     builder   = new GVTBuilder();

            ctx     = new BridgeContext(userAgent, loader);
            ctx.setDynamic(true);
            svgDoc  = (SVGDocument)loader.loadDocument(svg.toString());
            gvtRoot = builder.build(ctx, svgDoc);
        } catch(Exception e) {
            StringWriter trace = new StringWriter();
            e.printStackTrace(new PrintWriter(trace));
            report.setErrorCode(ERROR_READING_SVG);
View Full Code Here


      URL url = caller.toURL(key);
      if (url == null)
      {
        url = new File(".").toURI().toURL();
      }
      final SVGDocument document = (SVGDocument) loader.loadDocument
          (url.toURI().toASCIIString(), data.getResourceAsStream(caller));
      final BridgeContext ctx = new BridgeContext(userAgent, loader);
      final GVTBuilder builder = new GVTBuilder();
      final GraphicsNode node = builder.build(ctx, document);
      return new SimpleResource(data.getKey(), new SVGDrawable(node), DrawableWrapper.class, version);
View Full Code Here

      URL url = caller.toURL(key);
      if (url == null)
      {
        url = new File(".").toURI().toURL();
      }
      final SVGDocument document = (SVGDocument) loader.loadDocument
          (url.toURI().toASCIIString(), data.getResourceAsStream(caller));
      final BridgeContext ctx = new BridgeContext(userAgent, loader);
      final GVTBuilder builder = new GVTBuilder();
      final GraphicsNode node = builder.build(ctx, document);
      final Rectangle2D bounds = node.getBounds();
View Full Code Here

            UserAgent      userAgent = new UserAgentAdapter();
            DocumentLoader loader    = new DocumentLoader(userAgent);
            GVTBuilder     builder   = new GVTBuilder();

            ctx     = new BridgeContext(userAgent, loader);
            svgDoc  = (SVGDocument)loader.loadDocument(svg.toString());
            gvtRoot = builder.build(ctx, svgDoc);
        } catch(Exception e) {
            StringWriter trace = new StringWriter();
            e.printStackTrace(new PrintWriter(trace));
            report.setErrorCode(ERROR_READING_SVG);
View Full Code Here

            DocumentLoader loader  = bridgeContext.getDocumentLoader();
            SVGDocument    doc = null;

            try {
                doc  = (SVGDocument)loader.loadDocument(blURL.toString());
                if (doc == null) return doc;

                DOMImplementation impl;
                impl = SVGDOMImplementation.getDOMImplementation();
                doc  = (SVGDocument)DOMUtilities.deepCloneDocument(doc, impl);
View Full Code Here

    try
    {
      final long version = data.getVersion(caller);
      final HeadlessSVGUserAgent userAgent = new HeadlessSVGUserAgent();
      final DocumentLoader loader = new DocumentLoader(userAgent);
      final SVGDocument document = (SVGDocument) loader.loadDocument
          (String.valueOf(data.getKey().getIdentifier()), data.getResourceAsStream(caller));
      final BridgeContext ctx = new BridgeContext(userAgent, loader);
      final GVTBuilder builder = new GVTBuilder();
      final GraphicsNode node = builder.build(ctx, document);
      return new SimpleResource(data.getKey(), new SVGDrawable(node), version);
View Full Code Here

    try
    {
      final long version = data.getVersion(caller);
      final HeadlessSVGUserAgent userAgent = new HeadlessSVGUserAgent();
      final DocumentLoader loader = new DocumentLoader(userAgent);
      final SVGDocument document = (SVGDocument) loader.loadDocument
          (String.valueOf(data.getKey().getIdentifier()), data.getResourceAsStream(caller));
      final BridgeContext ctx = new BridgeContext(userAgent, loader);
      final GVTBuilder builder = new GVTBuilder();
      final GraphicsNode node = builder.build(ctx, document);
      final Rectangle2D bounds = node.getBounds();
View Full Code Here

            DocumentLoader loader  = bridgeContext.getDocumentLoader();
            SVGDocument    doc = null;

            try {
                doc  = (SVGDocument)loader.loadDocument(blURL.toString());
                if (doc == null) return doc;

                DOMImplementation impl;
                impl = SVGDOMImplementation.getDOMImplementation();
                doc  = (SVGDocument)DOMUtilities.deepCloneDocument(doc, impl);
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.