On Sep 17, 2006, at 14:58 , [EMAIL PROTECTED] wrote:
I'm not sure why you are bothering with the ImageRenderer.
I think you could just pass your 'myGraphics2D' into the paint
method on the gvtRoot element.
Thank you - that simplified it a lot. I'd just managed to miss the
method while wading through the APIs and code.
For archive purposes, rendering an SVG DOM into a Graphics2D context:
...
public void render( Graphics2D ctx ) {
UserAgent ua = new UserAgentAdapter();
BridgeContext bc = new BridgeContext( ua );
GVTBuilder builder = new GVTBuilder();
GraphicsNode gvtRoot = builder.build( bc, mySVGDocument );
gvtRoot.paint( ctx );
}
...
Will look into the dynamic BridgeContext next, it makes a lot of
sense once I get rid of certain hang-ups in my code.
I'm a little curious what your myGraphics2D is. Is it
something like a PDFGraphics2D and you are drawing multiple
pages?
Nothing fancy; just a regular java Graphics2D. It's just that I pick
several SVG drawings, modify assigned key values (colors,
transformations) dynamically based on numerical data and scripted
operations, and produce a collection of data visualization icons in a
single image. (Yes, eventually I'd just output SVG, but this is not
an option yet.)
Thanks;
//ebu
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]