This library is just a new PGraphics renderer for Processing, like the PDF or the DXF ones.
It extends the PGraphicsJava2D renderer, allowing to save the drawings of a sketch to a SVG file.
It doesn't handle animations, rendering only a static image.
It doesn't handle multiple pages. But it can be used to save a sequence of SVG files.
It has some limitations, particularly with pixel-manipulating functions (no filter, blend, mask...).
The Pausing While Recording (pause-resume) sketch of the PDF library cannot be done with P8gGraphicsSVG because of a different way of handling recording events: if this sketch is used with P8gGraphicsSVG instead of PDF, only the last drawing events will be recorded.
But an example sketch shows how to save a selected frame.
I had the idea to make this library after people reported issues with proSVG which is badly outdated.
I have a long interest for this graphical format (I made small improvements of the SVG support of Processing) so I was motivated to make such library.
Like proSVG, it is based on Apache Batik . I hand-selected the needed jars, a minimal set shipped with the library. Now, it uses jars I compiled myself (with Java 1.6, from trunk, so at version 1.8pre), to fix a text size bug in the official binary release.
You can find the source at http://bazaar.launchpad.net/~philho/+junk/Processing/files/head:/libraries/P8gGraphicsSVG/
The binary (and sources, no doc except examples and a README file) can be downloaded at http://phi.lho.free.fr/programming/Processing/P8gGraphicsSVG/index.html and via the new 2.0 mechanism of grabbing libraries from the PDE.
Please, read the README.txt file explaining the bases (and indicating a known bug from Batik).
Report bugs here.
[EDIT - 2012-11-29] Released v.2.0, major version because I renamed the library from PGraphicsSVG to P8gGraphicsSVG to conform to Processing library naming rules. The package name has been changed too, and the save() and saveFrame() methods have been removed, being ambiguous with bitmap saving. We use endRecord() more consistently now.
[EDIT - 2012-08-11] Released v.1.1, with some API changes and a tested, working saveFrame(). It uses its own numbering (the number of effective saveFrame() calls).
[EDIT - 2012-08-14] Released v.1.2. No changes in the library itself, but it includes Batik 1.8pre jars compiled from the SVN trunk.
[EDIT - 2012-08-15] Moved to a page on my own site... Updated the jar with the Processing library identity card... (libarry.properties)
It extends the PGraphicsJava2D renderer, allowing to save the drawings of a sketch to a SVG file.
It doesn't handle animations, rendering only a static image.
It doesn't handle multiple pages. But it can be used to save a sequence of SVG files.
It has some limitations, particularly with pixel-manipulating functions (no filter, blend, mask...).
The Pausing While Recording (pause-resume) sketch of the PDF library cannot be done with P8gGraphicsSVG because of a different way of handling recording events: if this sketch is used with P8gGraphicsSVG instead of PDF, only the last drawing events will be recorded.
But an example sketch shows how to save a selected frame.
I had the idea to make this library after people reported issues with proSVG which is badly outdated.
I have a long interest for this graphical format (I made small improvements of the SVG support of Processing) so I was motivated to make such library.
Like proSVG, it is based on Apache Batik . I hand-selected the needed jars, a minimal set shipped with the library. Now, it uses jars I compiled myself (with Java 1.6, from trunk, so at version 1.8pre), to fix a text size bug in the official binary release.
You can find the source at http://bazaar.launchpad.net/~philho/+junk/Processing/files/head:/libraries/P8gGraphicsSVG/
The binary (and sources, no doc except examples and a README file) can be downloaded at http://phi.lho.free.fr/programming/Processing/P8gGraphicsSVG/index.html and via the new 2.0 mechanism of grabbing libraries from the PDE.
Please, read the README.txt file explaining the bases (and indicating a known bug from Batik).
Report bugs here.
[EDIT - 2012-11-29] Released v.2.0, major version because I renamed the library from PGraphicsSVG to P8gGraphicsSVG to conform to Processing library naming rules. The package name has been changed too, and the save() and saveFrame() methods have been removed, being ambiguous with bitmap saving. We use endRecord() more consistently now.
[EDIT - 2012-08-11] Released v.1.1, with some API changes and a tested, working saveFrame(). It uses its own numbering (the number of effective saveFrame() calls).
[EDIT - 2012-08-14] Released v.1.2. No changes in the library itself, but it includes Batik 1.8pre jars compiled from the SVN trunk.
[EDIT - 2012-08-15] Moved to a page on my own site... Updated the jar with the Processing library identity card... (libarry.properties)
1