mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[notcurses.h] improve ncvisual_from_rgba() docs #1488
This commit is contained in:
parent
8e61429789
commit
3b169dfa31
14
USAGE.md
14
USAGE.md
@ -3000,13 +3000,13 @@ constructed directly from RGBA or BGRA 8bpc memory:
|
||||
|
||||
```c
|
||||
// Prepare an ncvisual, and its underlying plane, based off RGBA content in
|
||||
// memory at 'rgba'. 'rgba' must be a flat array of 32-bit 8bpc RGBA pixels.
|
||||
// These must be arranged in 'rowstride' lines, where the first 'cols' * 4b
|
||||
// are actual data. There must be 'rows' lines. The total size of 'rgba'
|
||||
// must thus be at least (rows * rowstride) bytes, of which (rows * cols * 4)
|
||||
// bytes are actual data. The resulting plane will be ceil('rows'/2)x'cols'.
|
||||
struct ncvisual* ncvisual_from_rgba(struct notcurses* nc, const void* rgba,
|
||||
int rows, int rowstride, int cols);
|
||||
// memory at 'rgba'. 'rgba' is laid out as 'rows' lines, each of which is
|
||||
// 'rowstride' bytes in length. Each line has 'cols' 32-bit 8bpc RGBA pixels
|
||||
// followed by possible padding (there will be 'rowstride' - 'cols' * 4 bytes
|
||||
// of padding). The total size of 'rgba' is thus (rows * rowstride) bytes, of
|
||||
// which (rows * cols * 4) bytes are actual non-padding data.
|
||||
struct ncvisual* ncvisual_from_rgba(const void* rgba, int rows,
|
||||
int rowstride, int cols);
|
||||
|
||||
// ncvisual_from_rgba(), but for BGRA.
|
||||
struct ncvisual* ncvisual_from_bgra(struct notcurses* nc, const void* bgra,
|
||||
|
@ -2391,11 +2391,11 @@ ncplane_double_box_sized(struct ncplane* n, uint32_t styles, uint64_t channels,
|
||||
API ALLOC struct ncvisual* ncvisual_from_file(const char* file);
|
||||
|
||||
// Prepare an ncvisual, and its underlying plane, based off RGBA content in
|
||||
// memory at 'rgba'. 'rgba' must be a flat array of 32-bit 8bpc RGBA pixels.
|
||||
// These must be arranged in 'rowstride' lines, where the first 'cols' * 4b
|
||||
// are actual data. There must be 'rows' lines. The total size of 'rgba'
|
||||
// must thus be at least (rows * rowstride) bytes, of which (rows * cols * 4)
|
||||
// bytes are actual data. Resulting planes are ceil('rows' / 2) x 'cols'.
|
||||
// memory at 'rgba'. 'rgba' is laid out as 'rows' lines, each of which is
|
||||
// 'rowstride' bytes in length. Each line has 'cols' 32-bit 8bpc RGBA pixels
|
||||
// followed by possible padding (there will be 'rowstride' - 'cols' * 4 bytes
|
||||
// of padding). The total size of 'rgba' is thus (rows * rowstride) bytes, of
|
||||
// which (rows * cols * 4) bytes are actual non-padding data.
|
||||
API ALLOC struct ncvisual* ncvisual_from_rgba(const void* rgba, int rows,
|
||||
int rowstride, int cols);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user