You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Ilian Alekov <ia...@tlogica.com> on 2001/06/28 17:08:38 UTC

batik

hello!
I get a nullpointerexception when running the following part of my code:
    protected void renderSVGDocument(Document doc, int x, int y) {

        UserAgent userAgent = new MUserAgent(new AffineTransform());

        GVTBuilder builder = new GVTBuilder();
        StaticRendererFactory srf = new StaticRendererFactory();
        GraphicsNodeRenderContext rc = srf.getRenderContext();
        BridgeContext ctx = new BridgeContext(userAgent, rc);
        GraphicsNode root;// = new GraphicsNode();
        graphics.translate(200, 100);
        graphics.setRenderingHints(rc.getRenderingHints());
        root = builder.build(ctx, doc);
     
	root.paint(graphics, rc); <-- That is the point where the exception is
raised!!!
        
	graphics.translate(-200, -100);
    }

Thanks in advance!

Ilian Alekov