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]