# svg editor

Be warned this is quite high on my wish-list, so don’t be too shocked should I jump in and pre-empt your efforts, which is of course possible for anything here, and/or someone else entirely could pip you to the post, but then again you cannot really complain if you do nothing and then nothing ever happens...
Something similar-ish to https://yqnn.github.io/svg-path-editor (not that I would bother spending much time looking at the source code, it’s all typescript and angular), or perhaps https://jxnblk.github.io/paths (path not shown/in url, slightly nicer source, but still jsx/webpack’d), or even https://codepen.io/jacksleight/pen/JjdJzzB (uses snap, lodash, and sylvester, apparently). Th third is probably the closest to the look & feel I’d like, but has no drag/drop, the second is a bit too simple, and while I wouldn’t turn down the scale/translate/rotate path operations of the first, I would not consider them critical or even slightly important. The ability to download or save a complete svg is a bit of a frill, though not excessively difficult, it’s the path editing bit that I really rather like. A little (always showing) actual size preview would not go amiss.
In short, draw a bunch of dots and lines on the screen and let the user drag them around, and update the string path as they do. At least in my head, that would easily be a single-source program of way less than 1000 lines. For comparison and possible simple starting point, demo\rosetta\Clock.exw is just 130 lines, not that you should need a timer, nor that it has any of the mouse, grid lines, or input/output stuff. Or demo\rosetta\Black_Box.exw is perhaps a bit more like it, at 997 lines, though obviously there be quite a bit of that you would not need.
Ultimately I would like to see svg images (esp icons) become first class citizens of xpGUI, iykwim.
UPDATE: demo\xpGUI\gDrawPolygon.exw is a good start...