Hi Tobin,

Tobin Fricke wrote:

I see that the JSVGCanvas class has a "setURI" method to fetch an SVG from
some URI.  However, I have an SVG document in a String... I just want to
give this SVG string to the JSVGCanvas and have it display it.  How should
I accomplish this?

Turn the String into a Reader (java.io.StringReader), parse it into a DOM tree using the org.apache.batik.dom.svg.SAXSVGDocumentFactory class. Give the resulting document to the canvas JSVGCanvas.setSVGDocument.

Secondly, what's the proper way to build something that has a dependency
on Batik?  i.e., what classpath do I use?

Depends on what you want or need out of the Batik toolkit. Take a look at http://xml.apache.org/batik/install.html#jarFiles for a diagram of jar file dependencies. You could also just build your own jar file the ant build file has an 'all-jar' target that builds one jar file that includes everything.

   You might also look at the manifest files for the batik
applications to see how they work.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to