[notcurses.h] remove bogus restriction for ncvisual_render #1488

This commit is contained in:
nick black 2021-04-07 19:59:19 -04:00
parent cc3cddf40b
commit 8e61429789
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 11 additions and 13 deletions

View File

@ -3062,15 +3062,14 @@ char* ncvisual_subtitle(const struct ncvisual* ncv);
And finally, the `ncvisual` can be blitted to one or more `ncplane`s: And finally, the `ncvisual` can be blitted to one or more `ncplane`s:
```c ```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. // 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 // A subregion of the visual can be rendered using 'begx', 'begy', 'lenx', and
// be rendered using 'begx', 'begy', 'lenx', and 'leny'. Negative values for // 'leny'. Negative values for 'begy' or 'begx' are an error. It is an error to
// 'begy' or 'begx' are an error. It is an error to specify any region beyond // specify any region beyond the boundaries of the frame. Returns the
// the boundaries of the frame. Returns the plane to which we drew (if ncv->n // (possibly newly-created) plane to which we drew.
// is NULL, a new plane will be created).
struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, 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, // 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()` // rewind to the first frame of the ncvisual. a subsequent `ncvisual_render()`

View File

@ -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) API int ncvisual_set_yx(const struct ncvisual* n, int y, int x, uint32_t pixel)
__attribute__ ((nonnull (1))); __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. // 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 // A subregion of the visual can be rendered using 'begx', 'begy', 'lenx', and
// be rendered using 'begx', 'begy', 'lenx', and 'leny'. Negative values for // 'leny'. Negative values for 'begy' or 'begx' are an error. It is an error to
// 'begy' or 'begx' are an error. It is an error to specify any region beyond // specify any region beyond the boundaries of the frame. Returns the
// the boundaries of the frame. Returns the plane to which we drew (if ncv->n // (possibly newly-created) plane to which we drew.
// is NULL, a new plane will be created).
API struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv, API struct ncplane* ncvisual_render(struct notcurses* nc, struct ncvisual* ncv,
const struct ncvisual_options* vopts) const struct ncvisual_options* vopts)
__attribute__ ((nonnull (2))); __attribute__ ((nonnull (2)));