Ten years ago, I attempted to write an SVG rendering library in pure Xojo code. Unfortunately, my experience at the time, combined with the limitations of Xojo’s drawing routines, led me to abandon the project.
Now, a decade later, I’ve decided to take another stab at it. Xojo’s framework has seen major improvements over the years… for example, the addition of the GraphicsPath
object, better miter settings, and other enhancements. These new features make it much easier to write an SVG rendering library. My own experience has also grown, allowing me to better tackle the math involved in vector graphics.
So I present to you xojo-svg at https://github.com/Zoclee/xojo-svg.
This new library builds upon the original version, with many, many, MANY bug fixes, lots of optimizations, and a code size reduction of more than 30%. All known issues have now been fixed.
@Thom_McGrath I’m not sure if you even remember submitting issues ten years ago, but I’ve tested and resolved all of them in this new version. Here’s an example of one of the SVGs that failed before.
This library is still far from a full implementation of the complete SVG specification, but it should render most SVGs without any problems.
I hope to expand on more advanced features such as shadows, text skewing matrices, and even animation in the future. I’d like to invite you to use and support this project for the benefit of the Xojo community.
For those who are serious about using SVGs in your projects, please consider adding your support to the following ticket. If the transformation matrix were exposed on the Graphics
object, it would dramatically reduce the amount of code required for this library and provide significant rendering performance benefits.