SVG saga ctd
-
I am rendering everything correctly so far in my tests, except gradients which I'm still implementing, and I hate the math. Oh, I hate the math. But I've gotten to the point where I'm over the hump. SVGs I expect will render are rendering. Now it's just a matter of fleshing the rest out, with the gradients being probably the most difficult bit. In part because gradient definitions are often (always?) declared across multiple tags, with xlink:href linking them in XML. In part because you can limit the gradient positioning to the local bounding box of the shape, and specify widths, heights, radiuses, and offsets in things like percentages or even mm. It's basically like CSS. In large part, because I have two reference implementations, but neither is going to quite work for the way I'm doing this, because I'm rendering strictly top-down, not keeping the XML nor the shapes I parse in memory. I render and I toss. Anyway, it's a little bit overwhelming at the moment, but I still feel pretty good about the progress I've made.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix