SVG vs OpenVG APIs for 2d drawing in Qt
-
I'm looking to start doing a lot of custom 2d graphics and I see Qt supports its own QPainter API, as well as the ability to render drawings in the SVG and OpenVG formats. I'm wondering if anyone can comment on the pros and cons of these 3 APIs for generating images from code. Other than the fact that QPainter is not a portable Api to other environments, what are the key considerations between these three?
-
Qt implements only SVGtiny specification, the module is unmaintained and has lots of known issues. I don't recommend using it for anything more complex than some simple icons. QtWebKit maintains a separate SVG painter that supports full SVG standard. It is harder to use, however, and draws in more severe dependencies (webkit).
I don't know the state of OpenVG support.
QPainter might not be available in other toolkits, but it's fully integrated, blazing fast and quite easy.
Qt also supports HTML5 Canvas APIs in QtQuick module.
And additionally, there is OpenGL-based SceneGraph, upon which QtQuick 2 is based.