https://issues.apache.org/bugzilla/show_bug.cgi?id=46825
--- Comment #5 from Sébastien Hamel <[email protected]> 2009-03-10 08:54:09 PST --- I still think there is a problem with the library... I reviewed the suggested steps to load a SVG and here are the ones that I'm using, they correspond to what is suggested in the wiki: String parser = XMLResourceDescriptor.getXMLParserClassName(); SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser); SVGDocument svgDocument = (SVGDocument) factory.createDocument(uri.toString()); GraphicsNode rootSvgNode = getRootNode(svgDocument); UserAgent userAgent = new UserAgentAdapter(); DocumentLoader loader = new DocumentLoader(userAgent); BridgeContext ctx = new BridgeContext(userAgent, loader); ctx.setDynamicState(BridgeContext.DYNAMIC); GVTBuilder builder = new GVTBuilder(); return builder.build(ctx, svgDoc); The last line is causing the problem: at org.apache.batik.bridge.BridgeContext.getReferencedNode(BridgeContext.java:780) at org.apache.batik.bridge.BridgeContext.getReferencedElement(BridgeContext.java:796) at org.apache.batik.bridge.PaintServer.convertURIPaint(PaintServer.java:351) at org.apache.batik.bridge.PaintServer.convertPaint(PaintServer.java:259) at org.apache.batik.bridge.PaintServer.convertFillPaint(PaintServer.java:228) at org.apache.batik.bridge.PaintServer.convertFillAndStroke(PaintServer.java:146) at org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(SVGShapeElementBridge.java:117) at org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createFillStrokePainter(SVGDecoratedShapeElementBridge.java:58) at org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(SVGDecoratedShapeElementBridge.java:84) at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(SVGShapeElementBridge.java:91) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82) If you could try those steps and tell if it's working for you with the SVG document attached, it would be greatly appreciated. Thanks, Sébastien -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
