2020-01-02 02:23:11 +00:00
|
|
|
% notcurses_lines(3)
|
|
|
|
% nick black <nickblack@linux.com>
|
2020-10-25 14:10:50 +00:00
|
|
|
% v2.0.2
|
2020-01-02 02:23:11 +00:00
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
2020-01-04 07:37:55 +00:00
|
|
|
notcurses_lines - operations on lines and boxes
|
2020-01-02 02:23:11 +00:00
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2020-04-19 22:46:32 +00:00
|
|
|
**#include <notcurses/notcurses.h>**
|
2020-01-02 02:23:11 +00:00
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**int ncplane_hline_interp(struct ncplane* n, const cell* c, int len, uint64_t c1, uint64_t c2);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**static inline int ncplane_hline(struct ncplane* n, const cell* c, int len);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**int ncplane_vline_interp(struct ncplane* n, const cell* c, int len, uint64_t c1, uint64_t c2);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**static inline int ncplane_vline(struct ncplane* n, const cell* c, int len);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
|
|
|
```c
|
|
|
|
#define NCBOXMASK_TOP 0x0001
|
|
|
|
#define NCBOXMASK_RIGHT 0x0002
|
|
|
|
#define NCBOXMASK_BOTTOM 0x0004
|
|
|
|
#define NCBOXMASK_LEFT 0x0008
|
|
|
|
#define NCBOXGRAD_TOP 0x0010
|
|
|
|
#define NCBOXGRAD_RIGHT 0x0020
|
|
|
|
#define NCBOXGRAD_BOTTOM 0x0040
|
|
|
|
#define NCBOXGRAD_LEFT 0x0080
|
|
|
|
#define NCBOXCORNER_MASK 0x0300
|
|
|
|
#define NCBOXCORNER_SHIFT 8u
|
|
|
|
```
|
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**int ncplane_box(struct ncplane* n, const cell* ul, const cell* ur, const cell* ll, const cell* lr, const cell* hline, const cell* vline, int ystop, int xstop, unsigned ctlword);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_box_sized(struct ncplane* n, const cell* ul, const cell* ur, const cell* ll, const cell* lr, const cell* hline, const cell* vline, int ylen, int xlen, unsigned ctlword);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**static inline int ncplane_perimeter(struct ncplane* n, const cell* ul, const cell* ur, const cell* ll, const cell* lr, const cell* hline, const cell* vline, unsigned ctlword)**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int cells_load_box(struct ncplane* n, uint32_t styles, uint64_t channels, cell* ul, cell* ur, cell* ll, cell* lr, cell* hl, cell* vl, const char* gclusters);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int cells_rounded_box(struct ncplane* n, uint32_t styles, uint64_t channels, cell* ul, cell* ur, cell* ll, cell* lr, cell* hl, cell* vl);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_rounded_box(struct ncplane* n, uint32_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_rounded_box_sized(struct ncplane* n, uint32_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int cells_double_box(struct ncplane* n, uint32_t styles, uint64_t channels, cell* ul, cell* ur, cell* ll, cell* lr, cell* hl, cell* vl);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_double_box(struct ncplane* n, uint32_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword);**
|
2020-02-12 17:29:28 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_double_box_sized(struct ncplane* n, uint32_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword);**
|
2020-01-04 07:37:55 +00:00
|
|
|
|
2020-02-14 10:14:04 +00:00
|
|
|
**int ncplane_polyfill_yx(struct ncplane* n, int y, int x, const cell* c);**
|
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**int ncplane_gradient(struct ncplane* n, const char* egc, uint32_t stylemask, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, int ystop, int xstop);**
|
2020-02-14 10:35:58 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**static inline int ncplane_gradient_sized(struct ncplane* n, const char* egc, uint32_t stylemask, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, int ylen, int xlen);**
|
2020-02-14 10:35:58 +00:00
|
|
|
|
2020-03-08 08:05:55 +00:00
|
|
|
**int ncplane_highgradient(struct ncplane* n, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr, int ystop, int xstop);**
|
|
|
|
|
2020-08-19 17:15:26 +00:00
|
|
|
**int ncplane_highgradient_sized(struct ncplane* n, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr, int ylen, int xlen);**
|
2020-03-08 08:05:55 +00:00
|
|
|
|
2020-08-23 17:04:10 +00:00
|
|
|
**int ncplane_format(struct ncplane* n, int ystop, int xstop, uint32_t stylemask);**
|
2020-02-21 11:52:57 +00:00
|
|
|
|
2020-02-21 12:00:53 +00:00
|
|
|
**int ncplane_stain(struct ncplane* n, int ystop, int xstop, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr);**
|
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# DESCRIPTION
|
|
|
|
|
2020-02-21 11:52:57 +00:00
|
|
|
**ncplane_format** sets the attributes of every cell in the region having its
|
|
|
|
upper-left corner at the cursor's current position, and its lower-right corner
|
|
|
|
at **ystop**, **xstop**.
|
2020-01-02 02:23:11 +00:00
|
|
|
|
2020-04-06 01:33:12 +00:00
|
|
|
Box- and line-drawing is unaffected by a plane's scrolling status.
|
|
|
|
|
2020-01-02 02:23:11 +00:00
|
|
|
# RETURN VALUES
|
|
|
|
|
2020-02-21 11:52:57 +00:00
|
|
|
**ncplane_format** returns -1 if either **ystop** or **xstop** is less than the
|
|
|
|
current equivalent position, otherwise 0.
|
2020-01-02 02:23:11 +00:00
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
2020-02-12 17:29:28 +00:00
|
|
|
**notcurses(3)**,
|
|
|
|
**notcurses_cell(3)**,
|
2020-05-09 00:56:39 +00:00
|
|
|
**notcurses_plane(3)**
|