1 /*
2 file name:lab.c
3 date : Wed 09 Feb 2022 10:00:53 PM EST
4 */
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <unistd.h>
8 #include <string.h>
9 #include <stdint.h>
10 #include <string.h>
11 #include <ncurses.h>
12
13 int32_t draw_retangle(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
14 int32_t draw_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
15
16 int main()
17 {
18 int col = 0;
19 int row = 0;
20
21 initscr();
22
23 getmaxyx(stdscr, col, row);
24
25 draw_retangle(0, 0, row - 1, col - 1);
26 draw_line(0, 0, row - 1, col - 1);
使用ncurses库在Ubuntu上画一个矩形
于 2022-02-10 12:32:59 首次发布