From 8e61429789d373d6b00c2c732aa7840eb9fc97a0 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 7 Apr 2021 19:59:19 -0400 Subject: [PATCH] [notcurses.h] remove bogus restriction for ncvisual_render #1488 --- USAGE.md | 13 ++++++------- include/notcurses/notcurses.h | 11 +++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/USAGE.md b/USAGE.md index 7e2400e8f..6703f243b 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3062,15 +3062,14 @@ char* ncvisual_subtitle(const struct ncvisual* ncv); And finally, the `ncvisual` can be blitted to one or more `ncplane`s: ```c -// Render the decoded frame to the specified ncplane (if one is not provided, +// Render the decoded frame to the specified ncplane. If one is not provided, // one will be created, having the exact size necessary to display the visual. -// In this case, 'style' must be NCSTYLE_NONE). A subregion of the visual can -// be rendered using 'begx', 'begy', 'lenx', and 'leny'. Negative values for -// 'begy' or 'begx' are an error. It is an error to specify any region beyond -// the boundaries of the frame. Returns the plane to which we drew (if ncv->n -// is NULL, a new plane will be created). +// A subregion of the visual can be rendered using 'begx', 'begy', 'lenx', and +// 'leny'. Negative values for 'begy' or 'begx' are an error. It is an error to +// specify any region beyond the boundaries of the frame. Returns the +// (possibly newly-created) plane to which we drew. struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, - const struct ncvisual_options* vopts); + const struct ncvisual_options* vopts) // decode the next frame ala ncvisual_decode(), but if we have reached the end, // rewind to the first frame of the ncvisual. a subsequent `ncvisual_render()` diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 0f4098dbc..b47aae31c 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -2500,13 +2500,12 @@ API int ncvisual_at_yx(const struct ncvisual* n, int y, int x, uint32_t* pixel) API int ncvisual_set_yx(const struct ncvisual* n, int y, int x, uint32_t pixel) __attribute__ ((nonnull (1))); -// Render the decoded frame to the specified ncplane (if one is not provided, +// Render the decoded frame to the specified ncplane. If one is not provided, // one will be created, having the exact size necessary to display the visual. -// In this case, 'style' must be NCSTYLE_NONE). A subregion of the visual can -// be rendered using 'begx', 'begy', 'lenx', and 'leny'. Negative values for -// 'begy' or 'begx' are an error. It is an error to specify any region beyond -// the boundaries of the frame. Returns the plane to which we drew (if ncv->n -// is NULL, a new plane will be created). +// A subregion of the visual can be rendered using 'begx', 'begy', 'lenx', and +// 'leny'. Negative values for 'begy' or 'begx' are an error. It is an error to +// specify any region beyond the boundaries of the frame. Returns the +// (possibly newly-created) plane to which we drew. API struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, const struct ncvisual_options* vopts) __attribute__ ((nonnull (2)));