xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilian Alekov <iale...@tlogica.com>
Subject batik
Date Thu, 28 Jun 2001 15:08:38 GMT
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
Mime
View raw message