PettySVG

PettySVG is an incredibly basic SVG renderer for Cocoa. It renders an absolutely microscopic subset of the full SVG specification. It doesn’t even compare with a professional quality SVG renderer such as the new ksvg support being added to WebKit.

PettySVG only supports the basic drawing primitives. Path support is currently semi-complete (and semi-broken). It does not support any SVG special effects or animations. In fact PettySVG only supports a couple of CSS styles and does not work with CSS inheritance at all. It also isn’t fast (I am working on a couple of optimisation ideas though).

I wrote PettySVG to render small, simplistic vector icons into an application that uses Quartz/CoreGraphics for drawing. I could have used PDF but because SVG is XML I can transform it using XSLT. PettySVG solves the problems I initially wrote it to solve. It is still a work in progress. I am releasing the code (such as it is) under the BSD license.

Source code: http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Projects/Misc/PettySVG

Sample application: PettySVG.zip

Example screenshot:

image (Based on test.svg)

This entry was posted in Default. Bookmark the permalink.