Skip to content

Instantly share code, notes, and snippets.

@Potherca
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Potherca/d644d4be3c9e6f97239c to your computer and use it in GitHub Desktop.
Save Potherca/d644d4be3c9e6f97239c to your computer and use it in GitHub Desktop.
Suggestion in regards to "Formatting for lines" for ASCII2SVG

Introduction

In the documentation for ASCIIToSVG, in regards to formatting (shape, color, style, etc.) it's author wrote:

If you have thoughts on how to do this for lines, please do let me know.

Well... I may have a suggestion.

Format for boxes

The format that is used for boxes is like this:

.-------------.  .--------------.
|[Red Box]    |  |[Blue Box]    |
'-------------'  '--------------'

[Red Box]: {"fill":"#aa4444"}
[Blue Box]: {"fill":"#ccccff"}

Format for lines

I would think using the same format that is currently used for boxes could also be used for lines:

-------------[Red Line]-------------->

<------------[Red Line]---------------

[Red Line]: {"fill":"#aa4444"}
[Blue Line]: {"fill":"#ccccff"}

What about vertical lines you say? Same principle applies:

    ^               |
    |               |
    |               |
    |               |
[Red Line]      [Blue Line]
    |               |
    |               |
    |               |
    |               V

[Red Line]: {"fill":"#aa4444"}
[Blue Line]: {"fill":"#ccccff"}

Disclamer

As I am not at all aware of the inner workings of the code this may be too simple a suggestion with all sorts of downsides. Working from the perspective of Idealized Design, however, this would be my suggestion.

RFC

So... Comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment