Although it currently only handles shapes, which is not enough for actual rendering of SVG alike vector graphics, it still looks very useful.
Yes, it could work like this:
- Parse an .svg(z) with
Batik.
- Retrieve a list of Java2D shapes using the Batik node tree.
- Convert everything to triangles with zShapes.
- Implement SVG rendering
That's the difficult part. Batik does this already with Java2D, but we need OpenGL rendering. It should be easy for fills and gradients, but it gets
complicated if you need scissoring, different blend modes, etc.
- At runtime, go through each shape node (would probably be a GL display list), apply the appropriate rendering state and you're done.
