Say, I want to write a desktop application that will heavily use SVG. What are my choices of rendering engines, GUI toolkits, libraries, etc.?
I would like it to:
So, what are my options?
I would suggest cairo, Cairo is a 2D graphics library with support for SVG file output.
The cairo API provides operations similar to the drawing operators of PostScript and PDF. Operations in cairo including stroking and filling cubic Bézier splines, transforming and compositing translucent images, and antialiased text rendering. All drawing operations can be transformed by any affine transformation (scale, rotation, shear, etc.)
Cairo is implemented as a library written in the C programming language, but bindings are available for several different programming languages. Which include Perl, Python, Ruby and so much more.
It also has several Toolkit Bindings. GTK+ 2.8+ has full support for cairo for example.
Also has and experimental backends with OpenGL. Which benefits include Easily integrate features like PS-, PDF-, SVG-support to your OpenGL-application (may need additional libraries).
Cairo is free software and is available to be redistributed and/or modified under the terms of either the GNU Lesser General Public License (LGPL) version 2.1 or the Mozilla Public License (MPL) version 1.1 at your option.
Considering the Safari Browser, which runs smoothly on a Mac. You could write your application using the Raphael library.
This database shows the Raphael language the page itself is pure vector graphics.
Just throwing this your way to see if it fits inside your constraints...
http://www.irunmywebsite.com/raphael/additionalhelp.php?v=2
Appcelarator Titanium Desktop seems like your best bet. You can write a Ruby, Python, or JavaScript app and use HTML and CSS as the GUI. There's also Adobe AIR but it's not open source.
As for SVG the best library I've found is d3.js. At first glance you might get the impression it's visualization library but it can be used for any type of SVG work. Some have mentioned Rapheal.js, its strength is that it's cross browser, however it leaves some SVG features out like group <g>
tags due to it having to use VML with most versions of IE.
I would suggest to go for Apache's Batik. Batik is Java-based SVG toolkit that can render, generate, manipulate and transcode SVG across all platforms wherever Java exists; from Desktops, applets and even handheld devices. It leverages the power of platform independence of Java. It is an ideal choice for Desktop applications. It supports full interactivity, linking, scripting and animations too.
Apache Cocoon, Oracle JDeveloper 10i, The JFreeChart project, ILOG Dicovery and Jviews - The advanced visual data analysis tools, Volity and Gamut Gaming projects, GLIPS Graffiti SVG Editor, eDoc Studio project, Apache FOP project etc. are some of the projects which use Batik.
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