Improvements to the parser, benchmarked this is now 19.4x faster then the previous version at reading and parsing SVG files, took the average down from 380ms for about 300 fairly complex files down to 24ms... :-)
This change includes various error handling methods on all relevant object initializers - also rewrote how we parse floats from strings, this seems to be about 2x quicker at parsing SVG's then it was previously :-)
FIxed various issues with parser not finding linked elements. Also added much better support for style attribute. Also added overal viewbox clipping and various other fixes.
Some SVG's use a relative move to command as the first command in the path, I dont know why, they should be absolute, so this is a work around for them as they will normally crash the bezier path
Now supports dashed strokes and line cap modes for lines that dont have a closed path.
Fixed issue with predefined colors not being found.
Added more examples to the example
Added support for the DEF elements.
Added support for linear gradients and very rudimentary support for radial gradients ( they dont really work )
Added style tag parsing in so the Def elements will work.