Parsing SVG files

I was thinking “Hey I have time to kill… let’s load SVG files into opengl!”

I was doing some googling and I didn’t have any luck with a concise reference for the tags used in an SVG file, so I thought I would post the question here. Ideally I would also want to know about any tags specific to Inkscape.

Any links or resources would be helpful :slight_smile:

CopyableCougar4

I’ve found the specification of SVG 1.1 (The Latest Release). Here’s the link http://www.w3.org/TR/SVG/

I’ve found some links:

http://xmlgraphics.apache.org/batik/

Android
https://code.google.com/p/andengineexamples/
https://code.google.com/r/newtondev-svg/

Qt
http://qt-project.org/wiki/QtWhitepaper
rendering-vector-graphics-in-opengl Look at 1st answer
http://qt-jambi.org/ Qt Jambi - Qt for Java

KevGlass did some work on SVG rendering as well. Don’t know what state it’s in.

Cas :slight_smile:

Gl, hf.

That’s quite some amount of work, if you want support for patterns, gradients, etc. But it’s also a nice learning experience, you get to know Bezier curves and all that stuff :slight_smile:

Did some work on it as well.
But what I’ve have done was to preprocess it. Maybe not the best effort.
If you want, I can drop the github link here. I just have to look for it first.

Hi

If you just need a simple parser, look at SVGSalamander, it is very simple and some developers already use it with JogAmp. Apache Batik is much more complete but it has a big memory footprint but maybe you can use just batik-util and batik-svg (don’t take all JARs). Both are good source of inspirations to write your own parser.

Hi,

I’ve found one more library for SVG rendering: JFreeSVG