hi, maybe you can use use SwingUtilities.paintComponent(Graphics g, Component c, Container p, Rectangle r) methods where the g is the graphics you need to draw to c could be JSVGComponent p don't know check the java docs r is the bounding box???
Regards Tonny Kohar http://www.kiyut.com On Sun, 2003-10-12 at 00:00, David Proft wrote: > Hello, > > I have seen many examples of how to write swing objects to SVG files and examples of > showing SVG files in Swing using the JSVGComponent class. However, I have not been > able to find an example that shows how to simply write SVG to a given Graphics > object. Let me explain, > > My problem is that I am using a graphing package where one can overwrite the node's > (which, BTW, is not a Swing component) paint() method. When this node is rendered > by the graphing package, I want the SVG image to be drawn. > > For example: > > private class MyNode extends JGoBasicNode > { > public void paint(Graphics2D g, JGoView view) > { > Rectangle boundingArea = getBoundingRect(); // The area/bounding box to > draw the SVG into > ---> XXX.drawSVG(<some SVG reference>, g, boundingArea); // Scale and draw the > SVG into the bounding area > } > } > > I'm looking for a way to make the above marked line be real code. I have looked at > the JSVGComponent source code but am not sure what exactly is needed to do the above. > > I know that this is not very efficient and maybe slow. My SVG files are very > simple, however. If my performance is still too poor, I will use images > (g.grawImage(...)). > > > Thank you in advance for your help, > > David > > --------------------------------------------------------------------- > 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]