DEV Community 👩‍💻👨‍💻

Ron Barry
Ron Barry

Posted on

Can you draw lines on the terminal?

An application I've been working on would be made sooooo much better, with a lot less code, if it were possible to draw a line on the screen. I'd imagine the drawing grid to coincide with the characters in the terminal, so <1, 1> would be the top-left pixel of the top-left character, and <5.5, 5.5> would be in the middle of the fifth character across, fifth character down.

I've struck out with Google, which I usually take to be a "no", but this would make so many things I do so much easier that I'm amazed I've never thought of it before. I realize that much of what terminals do is derived from the vt100 days, but iTerm does a LOT that would never have been considered back then, so fingers crossed...

Top comments (1)

Collapse
foodini profile image
Ron Barry Author

Just to clarify, I'm not talking about the horizontal and vertical lines that you get with the box drawing glyphs. I mean actual Bresenham lines from any (float) position in the terminal to any other. Definitely a feature I'd sell my own grandmother for. =]

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.