One of my hobbies to create graphics using my favorite photo editing tool, Pixelmator Pro. It’s a fantastic tool; anyone on macOS should add it to their Applications folder. One of the benefits of using a photo-editing tool is the ability to create Scalable Vector Graphics (SVG). SVGs are an XML-based format that allows you to edit and manipulate the content of an image with a text editor if you choose, but I wouldn’t recommend it. Photo-editing tools are much better at creating graphics, but SVGs provide a way to extend and repurpose existing assets.
In this post, I’ll show you how you can take an existing SVG and create a programmable visual asset with some C# code. Let’s get started.