GraphicsNode.paint() method will directly paint SVG to an onscreen drawing surface. However, there are different results between onscreen and offscreen surfaces on Composite rules (see Jonathan Knudsen's Java 2D Graphics from O'Reilly), you may not get the expected results with some SVG files that use complicated composite methods.
-----Original Message----- From: Thomas E Deweese [mailto:thomas.deweese@;kodak.com] Sent: Thursday, October 24, 2002 2:37 PM To: Batik Users Subject: RE: How Do I Render SVG To Graphics2D? Hi Charles, >>>>> "Charles" == Charles Rector <[EMAIL PROTECTED]> writes: Charles> My problem is that whenever I do not add the JSVGComponent to Charles> a frame to where it would be visible, calling a Charles> JSVGComponent's paint() method seems to do nothing. Which I Charles> can somewhat understand -- if a component is not visible, why Charles> should paint() do anything? You should call jsvgcomp.getGraphicsNode().paint(g2d); You may need to adjust the user to device transform in the g2d before calling this. Charles> At any rate, I need to be able to render the SVG independent Charles> of a component. Can somebody help me out here? I'm sure it's Charles> a simple process, but I need a little push in the right Charles> direction. Thanks! Charles> If it is of any use, I am using JDK 1.4 and Batik 1.5 beta 4. Good luck --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
