Lightweight C++ Library For SVG On Windows?
redblue writes "I would like to display vector graphics in my Windows C++ programs with minimal system requirements. Some of the possibilities are: 1. Enhanced Metafile Format format/EMF+, 2. Flash/SWG, 3. Silverlight/XAML, 4. SVG. The non-open proprietary nature of #2 & #3 make them unattractive. Since EMF+ is not amenable to easy editing, it leaves SVG as the only format worth pursuing. The trouble is that the major vendors have a lock on the market with their proprietary formats; leaving SVG high and dry with no easy native OS support. At least not on Windows. From what I could learn on the intertubes, Cairo is the best, if not only, reasonable system that may enable compiled SVG support. Unfortunately, AFAIK, it comes with a price tag of >2MB overhead and the C++ bindings are not straightforward." Read on for the rest of redblue's question; can you improve on his home-brewed solution?
"In a flash of the NIH syndrome, I rolled my own SVG processing engine and it has addressed my needs. You can see the result on http://www.arosmagic.com/Solitaire. A simple breakdown is: Framework+CRT(150K), SVG engine(100k), SVG art(350k). My SVG library is sufficient for me for now. But I can't help wonder:
1. Is there a better SVG library out there already available for easy inclusion?
2. If not, is there a need, i.e. market demand, for a lightweight (~200K) C++ SVG library that does not have the baggage of Silverlight or Flash?
If the answers are No/Yes, it may be worth it to make this library fully SVG compliant and release it as an open source alternative to the offerings from the entities that we shall not name but just collectively refer to as The Microbe. Please help out by letting me know if such a component is something that you would personally want to use in your current/future projects."
1. Is there a better SVG library out there already available for easy inclusion?
2. If not, is there a need, i.e. market demand, for a lightweight (~200K) C++ SVG library that does not have the baggage of Silverlight or Flash?
If the answers are No/Yes, it may be worth it to make this library fully SVG compliant and release it as an open source alternative to the offerings from the entities that we shall not name but just collectively refer to as The Microbe. Please help out by letting me know if such a component is something that you would personally want to use in your current/future projects."
http://en.wikipedia.org/wiki/Open_Specification_Promise
XAML is not a UI language or graphics format. It is an XML Based Application(Avalon) Markup Language.
What you want are xaml constructs made up of Paths and Glyphs. Inkscape will export these with minor bugs to be fixed in your favorite text editor (last i checked it was putting a "px" after a pixel width, ie Stroke="3px" instead of Stroke="3").
You can print anything you want to an XPS file (under vista), then extract that xps and get the xaml out (an xps is a xaml + resources zipped in a file)
Under windows (DX10+) your UI will be accelerated on the GPU. With any other alternative it's all software.
Or you can fuck around in vi or emacs like its 1984 and reinvent the wheel again because the wheels on the car are "too proprietary".
You could do a google search and find http://www.antigrain.com/, libsvg, and 100 other alternatives - but of course this article is only posted for ignoramus linux "users" to rail against the XAML "machine".
Writing software for a closed, proprietary OS promotes its ecosystem over that of an open, non-proprietary OS.
The submitter who got his pet project on the Slashdot front page included language implying he's "one of us". But he's contributing to an "evil" software empire, so his Slash-speak is just verbal whoring to get placement here.