Sorry for my earlier stupid question... Finally the light bulb in my head came on to ask: "why not use svgGenerator.transform(...)?" Duh!!
So now, my code works as follows: SVGGraphics2D svgGenerator = new SVGGraphics2D(ctx, false); legendComponent.paint(svgGenerator); svgGenerator.transform( java.awt.geom.AffineTransform.getTranslateInstance (legendComponent.getWidth(),.0)); graphComponent.paint(svgGenerator); svgGenerator.stream(out, useCSS); Thanks much, Elias. -----Original Message----- From: Fayyad, Elias Sent: Thursday, November 13, 2003 5:01 PM To: Batik Users Subject: How to paint 2 Jcomponents onto 1 SVGGraphics2D? Hello all, I was wondering if anyone has needed to do this before... I have two JComponent (a graph and a legend) which do NOT exist within the same frame (or graphics context). I would like for the final SVG doc to contain the stream from both components, but I need to control their placement. Currently, what I have is pretty much as follows: SVGGraphics2D svgGenerator = new SVGGraphics2D(ctx, false); graphComponent.paint(svgGenerator); legendComponent.paint(svgGenerator); svgGenerator.stream(out, useCSS); My SVG does contain the output from both components; however, depending on the complexity of the graph, and hence the complexity of my legend, my SVG (in certain scenarios) will have one of the components overlaying the other. Any suggestions as to how I can control their positions? Thank you, in advance, for the help - and apologies for the stupid question. Batik RULES!! Elias. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]