我了解 C++ ncurses 的基础知识,但我不知道如何在两个坐标之间绘制一条简单的线。
示例:
2----------3
我怎样才能做到这一点?
最佳答案
int hline(chtype ch, int n);
int whline(WINDOW *win, chtype ch, int n);
The
hline
andwhline
functions draw a horizontal (left to right) line usingch
starting at the current cursor position in the window. The current cursor position is not changed. The line is at mostn
characters long, or as many as fit into the window.
对于角色,您可能需要 ACS_HLINE
,但 -
也可能会起作用......也许更好。
关于c++ - 如何用ncurses画一条线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52331682/