Is there a good example of how to include an SVG canvas into a Java SWT project (particularly Holongate, though I would be interested in any other options)? Additionally, I would need to support this SVG canvas on Mac OS X, Windows and Linux clients, in case an implementation relies on native libraries. Thanks for any pointers.
Use batik (http://xmlgraphics.apache.org/batik/). Render SVG into the image. Display it in SWT container. Portable.
We implemented this functionality by embedding a Batik Swing canvas into an SWT composite, see here. It worked fine on Windows, but we couldn't scroll the canvas on Mac OS X.
However, the vast majority of our users were on Windows, so we didn't spend too much time trying to fix the Mac OS X bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With