lewish / asciiflow

ASCIIFlow
https://asciiflow.com
MIT License
4.64k stars 357 forks source link

Allow to change drawing options for lines, borders, corners, arrow starts/endings #241

Open juarezr opened 2 years ago

juarezr commented 2 years ago

Currently, asciiflow boxes, lines, and arrows are limited to only one line style, one corner style, and one arrow style.

But the Unicode box drawing characters allows variations and combinations that could be used to compose many styles.

It would be interesting for expanding the functionality to have options/shortcuts to change the style according to the mode selected.

The modes could be split by the parts of the element being drawn. For example:

This could apply to:

Examples:

SINGLE STYLE:

┌─────────────────────────────┐  ╔═════════════════════════════╗ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓   ╭─────────────────────────────╮
│                             │  ║                             ║ ┃                             ┃   │                             │
│         Solid Light         │  ║         Solid Double        ║ ┃         Solid  Heavy        ┃   │        Solid Rounded        │
│                             │  ║                             ║ ┃                             ┃   │                             │
└─────────────────────────────┘  ╚═════════════════════════════╝ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛   ╰─────────────────────────────╯

┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐  ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓  ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐  ┏┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┓
╎                             ╎  ╏                             ╏  ╎                             ╎  ┇                             ┇
╎     Double Dashed Light     ╎  ╏     Double Dashed Heavy     ╏  ╎     Triple Dashed Light     ╎  ┇     Triple Dashed Heavy     ┇
╎                             ╎  ╏                             ╏  ╎                             ╎  ┇                             ┇
└╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘  ┗╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┛  └╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘  ┗┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┛

┌┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┐  ┏┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┓
┆                             ┆  ┋                             ┋
┆     Quad Dashed Light       ┆  ┋     Quad Dashed Heavy       ┋
┆                             ┆  ┋                             ┋
└┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┘  ┗┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┉┛

███████████████████████████████  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████████████████  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
█████████ Solid Filled ████████  ░░░░░░░░░ Light Shaded ░░░░░░░░  ▒▒▒▒▒▒▒▒▒ Medium Shade ▒▒▒▒▒▒▒▒  ▓▓▓▓▓▓▓▓▓▓ Dark Shaded ▓▓▓▓▓▓▓▓
███████████████████████████████  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
███████████████████████████████  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

COMBINED STYLES (Vertical + Horizontal):

╒═════════════════════════════╕  ╓─────────────────────────────╖
│                             │  ║                             ║
│   Double Horizontal Solid   │  ║   Double Vertical Solid     ║
│                             │  ║                             ║
╘═════════════════════════════╛  ╙─────────────────────────────╜

┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐ ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐
│                             │ │                             │
│      Solid + Dashed         │ │       Dashed + Solid        │
│                             │ │                             │
└╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘ └╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘
lephuongbg commented 1 year ago

I had a drawing with previous version, with different line and corner style (dash line, + char in corner). Currently using https://asciiflow.com/legacy/ to edit it but would be nice if we can edit it on new version as well.