3 ms·
The path data won't be readable to the uninitiated no matter how verbose you make it. The encoding is not the mental bottleneck for reading or writing, it's the
by usrusr 4y ago
The path data won't be readable to the uninitiated no matter how verbose you make it. The encoding is not the mental bottleneck for reading or writing, it's the math. You'll be familiar with that encoding long before you can actually make sense of the numbers.
- vesinisa 4y agoOP should really extend his syntax with an optional verbose version of the SVG path language. It was always the reason I found typing / reading SVG files so difficult.
- usrusr 4y agoI'd actually love some alternative approaches to path description, that are translated into the common SVG path representation by a compiler. E.g. something turtle-like, where the "cursor" also has a heading and you could describe a curve like "10 degrees left, radius 50" and distances by outcome "straight on until we hit absolute y==100" (in a terse syntax of course). But a more verbose version of e.g. the arc-a? Not interested at all: those seven parameters (+2 from the implicit cursor) would not be particularly palatable even if they were all explicitly named.
- samatman 4y agoTry Pikchr! https://pikchr.org/home/doc/trunk/homepage.md https://pikchr.org/home/doc/trunk/homepage.md I'm working on a fork of it which allows classes to be added, and turns labels into <g> elements with an id attribute. Pretty great as-is, does more-or-less exactly what you want.
- usrusr 4y agoNot quite what I had in mind (seems to be more like a diagram DSL?), I'd rather stay within SVG, just with an improved experience. But thanks for sharing anyways, never heard of this and I should have. Even the name alone is awesome! (speaking of SVG experience, I've been fantasizing about an SVG editor that would, in a mouseover on path numbers, preview what would change if that value would wiggle a little up and down. Does anything like this exist?)
- samatman 4y agoIt's exactly a diagram DSL which outputs SVG. It's by the author of SQLite, and is used for all the syntax diagrams in the SQLite documentation, and a bunch of graphs in the Fossil docs.