martinthomson / aasvg

Turn ASCII art into SVG
BSD 2-Clause "Simplified" License
67 stars 10 forks source link

Squiggly lines #15

Closed bifurcation closed 6 months ago

bifurcation commented 6 months ago

Would be nice to be able to render something like:

~~~~~>
martinthomson commented 6 months ago

Patches welcome. I did some work to add double lines ====>, but this is somewhat more tricky as you have to draw each squiggle independently. (That is, you can't just say got from A to B with a squiggle, you have to effectively draw each curve.)

bifurcation commented 6 months ago

Wasn't too hard, just a little Bézier magic

https://github.com/martinthomson/aasvg/pull/16

martinthomson commented 6 months ago

You will observe that the new example has some spill-over on arrowheads from double lines and squiggly lines. That's probably worth fixing eventually, but all that fit and finish stuff is very fiddly. What you put together is very workable. I've released a new version in case you want to use it in anger.

bifurcation commented 6 months ago

Filed #17