Hi Erik, Erik Bunn <[EMAIL PROTECTED]> wrote on 09/15/2006 07:56:58 AM:
> ImageRenderer renderer = m_rendFactory.createStaticImageRenderer(); > renderer.updateOffScreen( m_width, m_height ); > renderer.setTransform( new AffineTransform() ); > renderer.setTree( gvtRoot ); > renderer.setDoubleBuffered( false ); > Shape area = new Rectangle( 0, 0, m_width, m_height ); > renderer.repaint( area ); > BufferedImage rend = renderer.getOffScreen(); > myGraphics2D.drawRenderedImage( rend, null ); 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. > I'm still a bit worried about performance - there's a possibility I > need to draw hundreds, if not thousands, of SVG DOM representations > into a large image. (There will be just one DOM, which I clone, > modify the clone with JXPath, render, repeat.) If you are going to do this, then you should configure your BridgeContext to be dynamic and only build the GVT tree once. Then your changes in the DOM will be reflected in the GVT tree automatically without having to rebuild the entire Graphics Tree. Also depending on exactly what you are doing when you draw the subsequent images into myGraphics2D you may be able to only 'rerender' the modified parts of the image. I'm a little curious what your myGraphics2D is. Is it something like a PDFGraphics2D and you are drawing multiple pages? > Haven't done any timing yet, though, and won't worry about it > until it's nice and loomy. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
