Re:SVG: The Good, the Bad and the Ugly
by kazinator on Friday February 12, 2021 @12:52PM
(#26116405)
You probably mean
Shore up some nesting for the commands with pattern matching, returning a path struct:
Error cases:
[ Parent
| on HN ]
Re:SVG: The Good, the Bad and the Ugly
by dan-robertson on Friday February 12, 2021 @04:26PM
(#26118727)
I think that’s too flat. There’s no easy place to put the width and suchlike. I think you’d want something like:
(path (M 10 10 H 90 V 90 H 10 L 10 10) :color red)
Though probably I would prefer something more nested if possible, so you have a list of instructions rather than needing to parse them out of a flattened list. And I would likely use an alist rather than a plist for attributes like colour or stroke width.