hello list,

when i load a document, change some bits in it, and then save it as a png using the PNGTranscoder, the changes i made to the DOM tree are not reflected in the result. however, i do set the context to dynamic and i do call addDOMListeners() .... what am i missing?

i have the following code:

        SVGDocument     doc;
        UserAgent       userAgent;
        DocumentLoader  loader;
        BridgeContext   ctx;
        GVTBuilder      builder;
        GraphicsNode    rootGN;

        doc             = [code to load svg as SVGDocument]

        userAgent       = new UserAgentAdapter();

        loader          = new DocumentLoader(userAgent);
        ctx             = new BridgeContext(userAgent, loader);
        ctx.setDynamicState(BridgeContext.DYNAMIC);

        builder         = new GVTBuilder();
        rootGN          = builder.build(ctx, doc);

        ctx.addDOMListeners();
        
        [ inserting some nodes etc.: changes to the dom tree ]

        PNGTranscoder t = new PNGTranscoder();
        TranscoderInput input = new TranscoderInput(doc);
        TranscoderOutput output = new TranscoderOutput(
                new FileOutputStream("test.png"));

        t.transcode(input, output);



.rm

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to