From b9628ca21a7dac6b7b31c74f4d7f5fc290d84871 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 6 Jun 2020 19:49:23 -0400 Subject: [PATCH] sync definitions of ncvisual_from_plane() --- USAGE.md | 14 +++++++------- doc/man/man3/notcurses_visual.3.md | 2 +- python/src/notcurses/build_notcurses.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/USAGE.md b/USAGE.md index 868fd8470..37aa31ace 100644 --- a/USAGE.md +++ b/USAGE.md @@ -2487,13 +2487,13 @@ struct ncvisual* ncvisual_from_bgra(struct notcurses* nc, const void* bgra, `ncvisual`s can also be loaded from the contents of a plane: ```c -// Promote an ncplane 'n' to an ncvisual. The plane should not be associated -// with an existing ncvisual, and may contain only spaces, half blocks, and -// full blocks. The latter will be checked, and any other glyph will result -// in a NULL being returned. This function exists so that planes can be -// subjected to ncvisual transformations. If possible, it's usually better -// to create the ncvisual from memory using ncvisual_from_rgba(). -struct ncvisual* ncvisual_from_plane(struct ncplane* n); +// Promote an ncplane 'n' to an ncvisual. The plane may contain only spaces, +// half blocks, and full blocks. The latter will be checked, and any other +// glyph will result in a NULL being returned. This function exists so that +// planes can be subjected to ncvisual transformations. If possible, it's +// better to create the ncvisual from memory using ncvisual_from_rgba(). +struct ncvisual* ncvisual_from_plane(const struct ncplane* n, ncblitter_e blit, + int begy, int begx, int leny, int lenx); ``` Various transformations can be applied to an `ncvisual`, regardless of how diff --git a/doc/man/man3/notcurses_visual.3.md b/doc/man/man3/notcurses_visual.3.md index b05832505..56cca8030 100644 --- a/doc/man/man3/notcurses_visual.3.md +++ b/doc/man/man3/notcurses_visual.3.md @@ -56,7 +56,7 @@ typedef int (*streamcb)(struct notcurses*, struct ncvisual*, void*); **struct ncvisual* ncvisual_from_bgra(const void* bgra, int rows, int rowstride, int cols);** -**struct ncvisual* ncvisual_from_plane(struct ncplane* n, int begy, int begx, int leny, int lenx);** +**struct ncvisual* ncvisual_from_plane(struct ncplane* n, ncblitter_e blit, int begy, int begx, int leny, int lenx);** **int ncvisual_geom(const struct notcurses* nc, const struct ncvisual* n, ncblitter_e blitter, int* y, int* x, int* toy, int* tox);** diff --git a/python/src/notcurses/build_notcurses.py b/python/src/notcurses/build_notcurses.py index 960bf4ae5..e65c1ea52 100644 --- a/python/src/notcurses/build_notcurses.py +++ b/python/src/notcurses/build_notcurses.py @@ -305,7 +305,7 @@ typedef enum { struct ncvisual* ncvisual_from_file(const char* file, nc_err_e* ncerr); struct ncvisual* ncvisual_from_rgba(const void* rgba, int rows, int rowstride, int cols); struct ncvisual* ncvisual_from_bgra(const void* rgba, int rows, int rowstride, int cols); -struct ncvisual* ncvisual_from_plane(const struct ncplane* n, int begy, int begx, int leny, int lenx); +struct ncvisual* ncvisual_from_plane(const struct ncplane* n, ncblitter_e blit, int begy, int begx, int leny, int lenx); int ncvisual_geom(const struct notcurses* nc, const struct ncvisual* n, ncblitter_e blitter, int* y, int* x, int* toy, int* tox); void ncvisual_destroy(struct ncvisual* ncv); nc_err_e ncvisual_decode(struct ncvisual* nc);