Mastering SVG: The Paint-Order Attribute Explained
You would think that in this age of generative AI, that going deep into a subject is no longer en vogue. I mean, when you’ve got copilot and ChatGPT at your finger tips, aren’t you just supposed to prompt your way to coding nirvana?
Well, us humans still have something to offer to the intellectual pursuits of programming. I’m going to explore one such case in point. I will use the rendering of .svg as a backdrop. This is kinda technical, so if you’re not into that, you might want to avert your eyes now.
Let’s Talk SVG Again
Last year, I did a whole multi-part series on how to write an SVG Rendering engine from the ground up: https://williamaadams.wordpress.com/2023/02/18/svg-from-the-ground-up-time-to-wrap-it-up/
Since the time of that writing, I’ve used the SVG engine quite a lot to create a mapping application, as well as be the foundation for creating some UI elements for general application usage. This past summer, a developer in the blend2d community asked if they could use the library as part of the work with the Tcl language.
Knowledge Surfing
As is fitting of the times, I spent a few minutes with ChatGPT/Dall*E to prompt my way to that image. In the distant past (last year), I would have used a search engine, scouring the internet for such an image. If I could even find anything close to what I wanted, I’d then be worried about copyright, and the fact the image is probably also being used by someone else. Now, I know this image is “my own”, at least I think so, and it represents exactly what I wanted.
I went through several iterations before I got to this image, and I could go through several more rounds, tweaking along the way, but it was less than 5 minute’s worth of work. Such is “the power of AI”.
This image represents a couple of things that are going on right now. Between advances in hardware tech, and the rise of new things such as LLMs, and quantum computing, and humanoid robotics, there’s a wave of things that threaten to swamp our human understanding of the world and the way things work. I recently had a discussion with a friend who’s working in the core of all this AI hullabaloo, and they are clearly thinking “what does this all mean? It’s moving so fast we haven’t truly thought about the implications to humanity…”. Just let that sink in for a moment. If you thought you were being overwhelmed as an outsider, the people on the inside are having the same thoughts.
OK, so… What to do?