From da13d8938db36b653a479ef829cd9efa29f5566f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Fri, 12 Nov 2021 19:56:13 +0100 Subject: [PATCH] [docs] fix ncplane_[format|stain] docs --- USAGE.md | 8 ++++---- include/notcurses/notcurses.h | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/USAGE.md b/USAGE.md index 67c840f0b..930db511a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1628,9 +1628,9 @@ int ncplane_gradient2x1(struct ncplane* n, int y, int x, unsigned ylen, uint32_t ll, uint32_t lr); // Set the given style throughout the specified region, keeping content and -// channels unchanged. The upper left corner is at 'x', 'y', and -1 may be +// channels unchanged. The upper left corner is at 'y', 'x', and -1 may be // specified to indicate the cursor's position in that dimension. The area -// is specified by 'xlen', 'ylen', and 0 may be specified to indicate everything +// is specified by 'ylen', 'xlen', and 0 may be specified to indicate everything // remaining to the right and below, respectively. It is an error for any // coordinate to be outside the plane. Returns the number of cells set, // or -1 on failure. @@ -1638,9 +1638,9 @@ int ncplane_format(struct ncplane* n, int y, int x, unsigned ylen, unsigned xlen, uint16_t stylemask); // Set the given channels throughout the specified region, keeping content and -// channels unchanged. The upper left corner is at 'x', 'y', and -1 may be +// channels unchanged. The upper left corner is at 'y', 'x', and -1 may be // specified to indicate the cursor's position in that dimension. The area -// is specified by 'xlen', 'ylen', and 0 may be specified to indicate everything +// is specified by 'ylen', 'xlen', and 0 may be specified to indicate everything // remaining to the right and below, respectively. It is an error for any // coordinate to be outside the plane. Returns the number of cells set, // or -1 on failure. diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 3feeb7149..8a38cc58d 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -2406,22 +2406,24 @@ API int ncplane_gradient2x1(struct ncplane* n, int y, int x, unsigned ylen, // Set the given style throughout the specified region, keeping content and // channels unchanged. The upper left corner is at 'y', 'x', and -1 may be -// specified to indicate the cursor's position in that dimension. The lower -// right corner is specified by 'ystop', 'xstop'. It is an error for any +// specified to indicate the cursor's position in that dimension. The area +// is specified by 'ylen', 'xlen', and 0 may be specified to indicate everything +// remaining to the right and below, respectively. It is an error for any // coordinate to be outside the plane. Returns the number of cells set, // or -1 on failure. -API int ncplane_format(struct ncplane* n, int y, int x, unsigned ystop, - unsigned xstop, uint16_t stylemask) +API int ncplane_format(struct ncplane* n, int y, int x, unsigned ylen, + unsigned xlen, uint16_t stylemask) __attribute__ ((nonnull (1))); // Set the given channels throughout the specified region, keeping content and -// attributes unchanged. The upper left corner is at 'x', 'y', and -1 may be -// specified to indicate the cursor's position in that dimension. The lower -// right corner is specified by 'xstop', 'ystop'. It is an error for any +// channels unchanged. The upper left corner is at 'y', 'x', and -1 may be +// specified to indicate the cursor's position in that dimension. The area +// is specified by 'ylen', 'xlen', and 0 may be specified to indicate everything +// remaining to the right and below, respectively. It is an error for any // coordinate to be outside the plane. Returns the number of cells set, // or -1 on failure. -API int ncplane_stain(struct ncplane* n, int y, int x, unsigned ystop, - unsigned xstop, uint64_t ul, uint64_t ur, +API int ncplane_stain(struct ncplane* n, int y, int x, unsigned ylen, + unsigned xlen, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) __attribute__ ((nonnull (1)));