Hi Qian.
Qian Li:
> 1. I am trying to add an rect to the SVGDocument and then display it in the
> JFrame.
> The JSVGCanvas can only display things which are on the main.svg, I cannot
> get it to
> display the new rect element which i have just added. I hope someone would
> help me out.
> Thank you so much. The source code appended in the end of the message.
The element that you create must be in the SVG namespace. That means
that you must use the createElementNS function rather than
createElement:
Element rectangle =
svgDoc.createElementNS("http://www.w3.org/2000/svg", "rect");
See http://jwatt.org/svg/authoring/#namespace-aware-methods for more
details.
> 2. I cannot find the org.w3c.dom.svg.SVGDocument java source and
> documentation in batik 1.7.
> Is it only available in batik 1.5? Does anyone know where I can find it?
Since the 1.7beta1 release, the W3C SVG DOM interfaces have been taken
from a jar provided by the Apache XML Graphics Commons project, rather
than being included in Batik’s repository. This means that javadocs
don’t get generated for them, unfortunately.
There are some javadocs from the 1.5 release online here:
http://www.yworks.com/products/yDoc/showcase/batik-1.5/
The interfaces won’t have changed since then.
--
Cameron McCormack, http://mcc.id.au/
xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]