ivanceras / svgbob

Convert your ascii diagram scribbles into happy little SVG
http://ivanceras.github.io/svgbob-editor/
Apache License 2.0
3.83k stars 108 forks source link

Syntax for an arc #91

Open jo-so opened 2 years ago

jo-so commented 2 years ago

Would it be possible to extend the syntax to draw an arc?

        +
       / \            "This would draw a sharp corner"
      /   v

        .
       / \            "This would dar an arc (a dot at the point where edges meet)"
      /   v

        .-.
       /   \          "This is the current way to draw something like an arc"
      /     v

test

ivanceras commented 2 years ago

I think this behavior is better, so I don't have to put a special behavior when the dot is surrounded by the slanted lines

  \ /
   .
  / \

It it was configured to do arcs, then this scenario would be a mesh.

jo-so commented 2 years ago

But at least in version 0.6.2 it's not a mesh.

  \ /    \ /   \ /   \ /   \ /    \ /   \ /
   .      +     '     ,     `      -     _
  / \    / \   / \   / \   / \    / \   / \
   "."    "+"   "'"   ","   "`"    "-"   "_"

  \ /   \ /   \ /
   o     O     *
  / \   / \   / \
   "o"   "O"   "*"

img

These are the test cases for the perpendicular case:

      |          |          |          |          |          |          |
      |          |          |          |          |          |          |
  ----.----  ----+----  ----'----  ----,----  ----`----  ---------  ----_----
      |          |          |          |          |          |          |
      |          |          |          |          |          |          |
      "."        "+"        "'"        ","        "`"        "-"        "_"

      |          |          |
      |          |          |
  ----o----  ----O----  ----*----
      |          |          |
      |          |          |
      "o"        "O"        "*"

img