notcurses_direct.3: add image render+raster to docs

This commit is contained in:
nick black 2021-03-14 23:16:29 -04:00
parent ede7594971
commit 70059297c0
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 17 additions and 0 deletions

View File

@ -453,6 +453,19 @@ int ncdirect_double_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
// the column of the cursor, and those to the right.
int ncdirect_render_image(struct ncdirect* nc, const char* filename,
ncblitter_e blitter, ncscale_e scale);
// Render an image using the specified blitter and scaling, but do not write
// the result. The image may be arbitrarily many rows -- the output will scroll
// -- but will only occupy the column of the cursor, and those to the right.
// To actually write (and free) this, invoke ncdirect_raster_frame(). 'maxx'
// and 'maxy', if greater than 0, are used for scaling; the terminal's geometry
// is otherwise used.
ncdirectv* ncdirect_render_frame(struct ncdirect* n, const char* filename,
ncblitter_e blitter, ncscale_e scale,
int maxy, int maxx);
// Takes the result of ncdirect_render_frame() and writes it to the output.
int ncdirect_raster_frame(struct ncdirect* n, ncdirectv* ncdv, ncalign_e align);
```
Several of the Notcurses capability predicates have `ncdirect` analogues:

View File

@ -86,6 +86,10 @@ notcurses_direct - minimal notcurses instances for styling text
**int ncdirect_render_image(struct ncdirect* ***n***, const char* ***filename***, ncblitter_e ***blitter***, ncscale_e ***scale***);**
**ncdirectv* ncdirect_render_frame(struct ncdirect* ***n***, const char* ***filename***, ncblitter_e ***blitter***, ncscale_e ***scale***, int ***maxy***, int ***maxx***);**
**int ncdirect_raster_frame(struct ncdirect* ***n***, ncdirectv* ***ncdv***, ncalign_e ***align***);**
**char* ncdirect_readline(struct ncdirect* ***n***, const char* ***prompt***);**
# DESCRIPTION