59 logerror(
"error loading %s", filename);
95 int stride = 4 * cols;
96 uint32_t* data = resize_bitmap(
ncv->data,
ncv->pixy,
ncv->pixx,
97 ncv->rowstride, rows, cols, stride);
102 if(rgba_blit_dispatch(
n, bset, stride, data, rows, cols, barg) >= 0){
105 if(data !=
ncv->data){
124 ncvisual* ret = malloc(
sizeof(*ret));
126 memset(ret, 0,
sizeof(*ret));
133 unsigned* restrict begx){
151shape_sprixel_plane(
const tinfo* ti,
unsigned cellpxy,
unsigned cellpxx,
152 unsigned dimy,
unsigned dimx,
154 ncscale_e scaling,
unsigned* disppixy,
unsigned* disppixx,
155 uint64_t flags,
unsigned* outy,
unsigned* outx,
156 int* placey,
int* placex,
int pxoffy,
int pxoffx){
166 if(*placey + *disppixy >= dimy){
167 *disppixy = dimy - *placey;
170 *disppixy -= *placey;
173 *disppixx -= *placex;
175 *disppixx *= cellpxx;
176 *disppixy *= cellpxy;
180 clamp_to_sixelmax(ti, disppixy, disppixx, outy, scaling);
182 scale_visual(
ncv, disppixy, disppixx);
184 clamp_to_sixelmax(ti, disppixy, disppixx, outy, scaling);
187 *disppixx =
ncv->pixx + pxoffx;
188 *disppixy =
ncv->pixy + pxoffy;
190 clamp_to_sixelmax(ti, disppixy, disppixx, outy, scaling);
211 unsigned* disppixy,
unsigned* disppixx,
212 unsigned* outy,
unsigned* outx,
213 int* placey,
int* placex){
215 logerror(
"got NULL for both sources");
220 memset(&fakevopts, 0,
sizeof(fakevopts));
228 logerror(
"requested child plane with NULL n");
244 geom->
pixy =
n->pixy;
245 geom->
pixx =
n->pixx;
253 *bset = rgba_blitter(ti,
vopts);
265 geom->
scaley = encoding_y_scale(ti, *bset);
266 geom->
scalex = encoding_x_scale(ti, *bset);
284 if(geom->
begx >=
n->pixx || geom->
begy >=
n->pixy){
285 logerror(
"visual too large %u > %d or %u > %d", geom->
begy,
n->pixy, geom->
begx,
n->pixx);
294 if(geom->
lenx <= 0 || geom->
leny <= 0){
307 logerror(
"won't blit bitmaps to the standard plane");
330 if(rows > ncplane_dim_y(
vopts->n)){
336 if(cols > ncplane_dim_x(
vopts->n)){
345 const int dimy = p ? p->
dimy : ti->
dimy;
346 const int dimx = p ? p->
dimx : ti->
dimx;
347 shape_sprixel_plane(ti, geom->
cdimy, geom->
cdimx, dimy, dimx,
354 *disppixx *= geom->
cdimx;
355 *disppixx +=
vopts->pxoffx;
356 *disppixy *= geom->
cdimy;
357 *disppixy +=
vopts->pxoffy;
358 clamp_to_sixelmax(ti, disppixy, disppixx, outy,
scaling);
359 int absplacex = 0, absplacey = 0;
366 *disppixx -= absplacex * geom->
cdimx;
367 *disppixy -= absplacey * geom->
cdimy;
372 logdebug(
"pixel prescale: %d %d %d %d",
n->pixy,
n->pixx, *disppixy, *disppixx);
374 clamp_to_sixelmax(ti, disppixy, disppixx, outy,
scaling);
375 scale_visual(
n, disppixy, disppixx);
377 clamp_to_sixelmax(ti, disppixy, disppixx, outy,
scaling);
379 while((*outy + geom->
cdimy - 1) / geom->
cdimy > ncplane_dim_y(
vopts->n)){
384 *disppixx -=
vopts->pxoffx;
385 *disppixy -=
vopts->pxoffy;
387 logdebug(
"pblit: %dx%d ← %dx%d of %d/%d stride %u @%dx%d %p %u", *disppixy, *disppixx, geom->
begy, geom->
begx,
n->pixy,
n->pixx,
n->rowstride, *placey, *placex,
n->data, geom->
cdimx);
388 geom->
rpixy = *disppixy;
389 geom->
rpixx = *disppixx;
394 logerror(
"pixel offsets cannot be used with cell blitting");
397 unsigned dispcols, disprows;
401 dispcols = geom->
lenx;
402 disprows = geom->
leny;
413 scale_visual(
n, &disprows, &dispcols);
419 dispcols = geom->
lenx;
420 disprows = geom->
leny;
432 scale_visual(
n, &disprows, &dispcols);
436 *placex = ncplane_halign(
vopts->n, *placex, dispcols / geom->
scalex);
439 *placey = ncplane_valign(
vopts->n, *placey, disprows / geom->
scaley);
442 geom->
rpixy = disprows;
443 geom->
rpixx = dispcols;
455 unsigned disppxy, disppxx, outy, outx;
458 &disppxy, &disppxx, &outy, &outx, &placey, &placex);
465 if(*rowstride < cols * 4){
468 uint32_t* ret = malloc(4 * cols * rows);
470 for(
int y = 0 ;
y < rows ; ++
y){
471 for(
int x = 0 ;
x < cols ; ++
x){
472 const uint32_t* src = (
const uint32_t*)data + (*rowstride / 4) *
y +
x;
473 uint32_t* dst = ret + cols *
y +
x;
474 ncpixel_set_a(dst, alpha);
475 ncpixel_set_r(dst, ncpixel_r(*src));
476 ncpixel_set_g(dst, ncpixel_g(*src));
477 ncpixel_set_b(dst, ncpixel_b(*src));
481 *rowstride = cols * 4;
486 if(*rowstride < cols * 3){
489 uint32_t* ret = malloc(4 * cols * rows);
491 for(
int y = 0 ;
y < rows ; ++
y){
492 for(
int x = 0 ;
x < cols ; ++
x){
493 const unsigned char* src = (
const unsigned char*)data + *rowstride *
y +
x;
494 uint32_t* dst = ret + cols *
y +
x;
495 ncpixel_set_a(dst, alpha);
496 ncpixel_set_r(dst, src[0]);
497 ncpixel_set_g(dst, src[1]);
498 ncpixel_set_b(dst, src[2]);
502 *rowstride = cols * 4;
506void*
bgra_to_rgba(
const void* data,
int rows,
int* rowstride,
int cols,
int alpha){
510 if(*rowstride < cols * 4){
513 uint32_t* ret = malloc(4 * cols * rows);
515 for(
int y = 0 ;
y < rows ; ++
y){
516 for(
int x = 0 ;
x < cols ; ++
x){
517 const uint32_t* src = (
const uint32_t*)data + (*rowstride / 4) *
y +
x;
518 uint32_t* dst = ret + cols *
y +
x;
519 ncpixel_set_a(dst, alpha);
520 ncpixel_set_r(dst, ncpixel_b(*src));
521 ncpixel_set_g(dst, ncpixel_g(*src));
522 ncpixel_set_b(dst, ncpixel_r(*src));
526 *rowstride = cols * 4;
535 int* offy,
int* offx){
537 unsigned rcol = UINT_MAX;
545 for(trow = 0 ; trow <
ncv->pixy ; ++trow){
546 for(
unsigned x = 0 ;
x <
ncv->pixx ; ++
x){
547 uint32_t rgba =
ncv->data[trow *
ncv->rowstride / 4 +
x];
552 for(xr =
ncv->pixx - 1 ; xr >
x ; --xr){
553 rgba =
ncv->data[trow *
ncv->rowstride / 4 + xr];
566 if(trow ==
ncv->pixy){
576 for(brow =
ncv->pixy - 1 ; brow > trow ; --brow){
578 for(
x = 0 ;
x <
ncv->pixx ; ++
x){
579 uint32_t rgba =
ncv->data[brow *
ncv->rowstride / 4 +
x];
585 for(xr =
ncv->pixx - 1 ; xr >
x && xr > rcol ; --xr){
586 rgba =
ncv->data[brow *
ncv->rowstride / 4 + xr];
603 for(
unsigned y = trow + 1 ;
y < brow ; ++
y){
604 for(
unsigned x = 0 ;
x < lcol ; ++
x){
605 uint32_t rgba =
ncv->data[
y *
ncv->rowstride / 4 +
x];
611 for(
unsigned x =
ncv->pixx - 1 ;
x > rcol ; --
x){
612 uint32_t rgba =
ncv->data[
y *
ncv->rowstride / 4 +
x];
620 *leny = brow - trow + 1;
622 *lenx = rcol - lcol + 1;
624 return *leny * *lenx;
641rotate_point(
int*
y,
int*
x,
double stheta,
double ctheta,
int centy,
int centx){
643 const int convx = *
x - centx;
644 const int convy = *
y - centy;
646 *
x = round(convx * ctheta - convy * stheta);
647 *
y = round(convx * stheta + convy * ctheta);
655rotate_bounding_box(
double stheta,
double ctheta,
int* leny,
int* lenx,
656 int* offy,
int* offx){
661 center_box(¢y, ¢x);
664 rotate_point(ys, xs, stheta, ctheta, centy, centx);
668 rotate_point(ys + 1, xs + 1, stheta, ctheta, centy, centx);
672 rotate_point(ys + 2, xs + 2, stheta, ctheta, centy, centx);
676 rotate_point(ys + 3, xs + 3, stheta, ctheta, centy, centx);
682 for(
size_t i = 1 ; i <
sizeof(xs) /
sizeof(*xs) ; ++i){
697 *leny = brow - trow + 1;
699 *lenx = rcol - lcol + 1;
701 return *leny * *lenx;
708 ncvisual_center(
ncv, ¢y, ¢x);
709 double stheta, ctheta;
720 logerror(
"couldn't find a bounding box");
724 bbarea = rotate_bounding_box(stheta, ctheta, &bby, &bbx, &bboffy, &bboffx);
726 logerror(
"couldn't rotate the visual (%d, %d, %d, %d)", bby, bbx, bboffy, bboffx);
729 int bbcentx = bbx, bbcenty = bby;
730 center_box(&bbcenty, &bbcentx);
733 uint32_t* data = malloc(bbarea * 4);
737 memset(data, 0, bbarea * 4);
739 for(
unsigned y = 0 ;
y <
ncv->pixy ; ++
y){
740 for(
unsigned x = 0 ;
x <
ncv->pixx ; ++
x){
741 int targx =
x, targy =
y;
742 rotate_point(&targy, &targx, stheta, ctheta, centy, centx);
743 if(targx > bboffx && targy > bboffy){
744 const int deconvx = targx - bboffx;
745 const int deconvy = targy - bboffy;
746 if(deconvy < bby && deconvx < bbx){
747 data[deconvy * bbx + deconvx] =
ncv->data[
y * (
ncv->rowstride / 4) +
x];
754 ncvisual_set_data(
ncv, data,
true);
757 ncv->rowstride = bbx * 4;
763pad_for_image(
size_t stride,
int cols){
766 }
else if(stride < cols * 4u){
778 logerror(
"rowstride %d not a multiple of 4", rowstride);
781 if(rowstride * 4 < cols || cols <= 0 || rows <= 0){
782 logerror(
"invalid rowstride or geometry");
788 ncv->rowstride = pad_for_image(rowstride, cols);
791 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
796 for(
int y = 0 ;
y < rows ; ++
y){
798 memcpy(data + (
ncv->rowstride *
y) / 4, (
const char*)rgba + rowstride *
y, rowstride);
800 ncvisual_set_data(
ncv, data,
true);
809 logerror(
"failed converting sixel to rgba");
818 int cols,
int alpha){
820 logerror(
"rowstride %d not a multiple of 3", rowstride);
823 if(rows <= 0 || cols <= 0 || rowstride < cols * 3){
824 logerror(
"illegal packed rgb geometry");
829 ncv->rowstride = pad_for_image(cols * 4, cols);
832 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
837 const unsigned char* src = rgba;
838 for(
int y = 0 ;
y < rows ; ++
y){
840 for(
int x = 0 ;
x < cols ; ++
x){
841 unsigned char r, g, b;
842 memcpy(&
r, src + rowstride *
y + 3 *
x, 1);
843 memcpy(&g, src + rowstride *
y + 3 *
x + 1, 1);
844 memcpy(&b, src + rowstride *
y + 3 *
x + 2, 1);
845 ncpixel_set_a(&data[
y *
ncv->rowstride / 4 +
x], alpha);
846 ncpixel_set_r(&data[
y *
ncv->rowstride / 4 +
x],
r);
847 ncpixel_set_g(&data[
y *
ncv->rowstride / 4 +
x], g);
848 ncpixel_set_b(&data[
y *
ncv->rowstride / 4 +
x], b);
852 ncvisual_set_data(
ncv, data,
true);
859 int cols,
int alpha){
861 logerror(
"rowstride %d not a multiple of 4", rowstride);
864 if(rows <= 0 || cols <= 0 || rowstride < cols * 4){
865 logerror(
"illegal packed rgb geometry");
870 ncv->rowstride = pad_for_image(cols * 4, cols);
873 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
878 for(
int y = 0 ;
y < rows ; ++
y){
880 memcpy(data + (
ncv->rowstride *
y) / 4, (
const char*)rgba + rowstride *
y, rowstride);
881 for(
int x = 0 ;
x < cols ; ++
x){
882 ncpixel_set_a(&data[
y *
ncv->rowstride / 4 +
x], alpha);
885 ncvisual_set_data(
ncv, data,
true);
893 logerror(
"rowstride %d not a multiple of 4", rowstride);
896 if(rows <= 0 || cols <= 0 || rowstride < cols * 4){
902 ncv->rowstride = pad_for_image(rowstride, cols);
905 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
910 for(
int y = 0 ;
y < rows ; ++
y){
911 for(
int x = 0 ;
x < cols ; ++
x){
913 memcpy(&src, (
const char*)bgra +
y * rowstride +
x * 4, 4);
914 uint32_t* dst = &data[
ncv->rowstride *
y / 4 +
x];
915 ncpixel_set_a(dst, ncpixel_a(src));
916 ncpixel_set_r(dst, ncpixel_b(src));
917 ncpixel_set_g(dst, ncpixel_g(src));
918 ncpixel_set_b(dst, ncpixel_r(src));
922 ncvisual_set_data(
ncv, data,
true);
929 int cols,
int palsize,
int pstride,
930 const uint32_t* palette){
931 if(pstride <= 0 || rowstride % pstride){
932 logerror(
"bad pstride (%d) for rowstride (%d)", pstride, rowstride);
935 if(rows <= 0 || cols <= 0 || rowstride < cols * pstride){
936 logerror(
"illegal palimg geometry");
939 if(palsize > 256 || palsize <= 0){
940 logerror(
"palettes size (%d) is unsupported", palsize);
945 ncv->rowstride = pad_for_image(rowstride, cols);
948 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
953 for(
int y = 0 ;
y < rows ; ++
y){
954 for(
int x = 0 ;
x < cols ; ++
x){
955 int palidx = ((
const unsigned char*)pdata)[
y * rowstride +
x * pstride];
956 if(palidx >= palsize){
959 logerror(
"invalid palette idx %d >= %d", palidx, palsize);
962 uint32_t src = palette[palidx];
963 uint32_t* dst = &data[
ncv->rowstride *
y / 4 +
x];
964 if(ncchannel_default_p(src)){
966 ncpixel_set_a(dst, 255 - palidx);
967 ncpixel_set_r(dst, palidx);
968 ncpixel_set_g(dst, 220 - (palidx / 2));
969 ncpixel_set_b(dst, palidx);
976 ncvisual_set_data(
ncv, data,
true);
993 size_t dstride = pad_for_image(cols * 4, cols);
994 uint32_t*
r = resize_bitmap(
n->data,
n->pixy,
n->pixx,
n->rowstride,
995 rows, cols, dstride);
999 ncvisual_set_data(
n,
r,
true);
1000 n->rowstride = dstride;
1014 int placey,
int placex,
1016 uint64_t flags, uint32_t transcolor){
1017 logdebug(
"cblit: rows/cols: %dx%d plane: %d/%d pix: %d/%d",
geom->rcelly,
geom->rcellx, ncplane_dim_y(
n), ncplane_dim_x(
n),
geom->rpixy,
geom->rpixx);
1024 bargs.
flags = flags;
1052 ncplane*
n, uint64_t flags, uint32_t transcolor,
1053 int pxoffy,
int pxoffx){
1054 logdebug(
"pblit: rows/cols: %dx%d plane: %d/%d",
geom->rcelly,
geom->rcellx, ncplane_dim_y(
n), ncplane_dim_x(
n));
1062 bargs.
flags = flags;
1068 const ncpile* p = ncplane_pile_const(
n);
1069 if(
n->sprite ==
NULL){
1073 if((
n->tam = create_tam(
geom->rcelly,
geom->rcellx)) ==
NULL){
1078 if(
n->sprite->dimy !=
geom->rcelly ||
n->sprite->dimx !=
geom->rcellx){
1080 if((
n->tam = create_tam(
geom->rcelly,
geom->rcellx)) ==
NULL){
1084 n->sprite->dimx =
geom->rcellx;
1085 n->sprite->dimy =
geom->rcelly;
1125 cleanup_tam(
n->tam,
geom->rcelly,
geom->rcellx);
1140 memset(&fakevopts, 0,
sizeof(fakevopts));
1147 unsigned disppxy, disppxx, outy, outx;
1150 &disppxy, &disppxx, &outy, &outx,
1156 uint32_t transcolor = 0;
1158 transcolor = 0x1000000ull |
vopts->transcolor;
1180 loginfo(
"placing new plane: %d/%d @ %d/%d 0x%016" PRIx64, nopts.
rows, nopts.
cols, nopts.
y, nopts.
x, nopts.
flags);
1186 if((createdn =
n) ==
NULL){
1210 unsigned leny,
unsigned lenx){
1212 uint32_t* rgba =
ncplane_as_rgba(
n, blit, begy, begx, leny, lenx, &py, &px);
1217 unsigned dimy, dimx;
1239 const struct timespec* tspec,
void* curry){
1254 clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, tspec,
NULL);
1268 n->data[
y * (
n->rowstride / 4) +
x] = pixel;
1274 logerror(
"invalid coordinates %u/%u (%d/%d)",
y,
x,
n->pixy,
n->pixx);
1278 logerror(
"invalid coordinates %u/%u (%d/%d)",
y,
x,
n->pixy,
n->pixx);
1281 *pixel =
n->data[
y * (
n->rowstride / 4) +
x];
1289ncvisual_polyfill_core(
ncvisual*
n,
unsigned y,
unsigned x, uint32_t rgba, uint32_t match){
1290 struct topolyfill* stack = malloc(
sizeof(*stack));
1304 uint32_t* pixel = &
n->data[
y * (
n->rowstride / 4) +
x];
1305 if(*pixel == match && *pixel != rgba){
1310 if(create_polyfill_op(
y - 1,
x, &stack) ==
NULL){
1314 if(
y + 1 <
n->pixy){
1315 if(create_polyfill_op(
y + 1,
x, &stack) ==
NULL){
1320 if(create_polyfill_op(
y,
x - 1, &stack) ==
NULL){
1324 if(
x + 1 <
n->pixx){
1325 if(create_polyfill_op(
y,
x + 1, &stack) ==
NULL){
1353 uint32_t* pixel = &
n->data[
y * (
n->rowstride / 4) +
x];
1354 return ncvisual_polyfill_core(
n,
y,
x, rgba, *pixel);
__attribute__((nonnull(1, 2))) static inline int egcpool_stash(egcpool *pool
sprixel * sprixel_recycle(ncplane *n)
void sprixel_hide(sprixel *s)
sprixel * sprixel_alloc(ncplane *n, int dimy, int dimx)
#define logerror(fmt,...)
#define logdebug(fmt,...)
int ncplane_abs_x(const ncplane *n)
ncplane * ncpile_create(notcurses *nc, const struct ncplane_options *nopts)
int ncplane_destroy(ncplane *ncp)
int ncplane_abs_y(const ncplane *n)
const notcurses * ncplane_notcurses_const(const ncplane *n)
const ncplane * notcurses_stdplane_const(const notcurses *nc)
const ncplane * ncplane_parent_const(const ncplane *n)
uint32_t * ncplane_as_rgba(const ncplane *nc, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx, unsigned *pxdimy, unsigned *pxdimx)
int ncplane_resize(ncplane *n, int keepy, int keepx, unsigned keepleny, unsigned keeplenx, int yoff, int xoff, unsigned ylen, unsigned xlen)
notcurses * ncplane_notcurses(const ncplane *n)
ncplane * ncplane_create(ncplane *n, const ncplane_options *nopts)
void ncplane_dim_yx(const ncplane *n, unsigned *rows, unsigned *cols)
#define NCVISUAL_OPTION_CHILDPLANE
const struct ncplane_options struct ncvisual * ncv
#define NCPLANE_OPTION_HORALIGNED
const struct ncplane_options struct ncvisual struct ncvisual_options * vopts
#define NCPLANE_OPTION_VERALIGNED
#define NCVISUAL_OPTION_NOINTERPOLATE
#define NCVISUAL_OPTION_ADDALPHA
#define NCVISUAL_OPTION_VERALIGNED
int(* ncstreamcb)(struct ncvisual *, struct ncvisual_options *, const struct timespec *, void *)
#define NCVISUAL_OPTION_HORALIGNED
uint32_t * ncsixel_as_rgba(const char *sx, unsigned leny, unsigned lenx)
struct blitterargs::@3::@5 pixel
struct blitterargs::@3::@4 cell
int(* visual_resize)(struct ncvisual *ncv, unsigned rows, unsigned cols)
int(* visual_stream)(notcurses *nc, struct ncvisual *ncv, float timescale, ncstreamcb streamer, const struct ncvisual_options *vopts, void *curry)
int(* visual_decode)(struct ncvisual *nc)
void(* visual_printbanner)(fbuf *f)
int(* visual_decode_loop)(struct ncvisual *nc)
ncplane *(* visual_subtitle)(ncplane *parent, const struct ncvisual *ncv)
void(* visual_details_seed)(struct ncvisual *ncv)
int(* visual_blit)(const struct ncvisual *ncv, unsigned rows, unsigned cols, ncplane *n, const struct blitset *bset, const blitterargs *barg)
struct ncvisual *(* visual_create)(void)
void(* visual_destroy)(struct ncvisual *ncv)
int(* visual_init)(int loglevel)
struct ncvisual *(* visual_from_file)(const char *fname)
unsigned sprixel_scale_height
void * rgb_packed_to_rgba(const void *data, int rows, int *rowstride, int cols, int alpha)
ncvisual * ncvisual_from_bgra(const void *bgra, int rows, int rowstride, int cols)
ncvisual * ncvisual_from_rgba(const void *rgba, int rows, int rowstride, int cols)
bool notcurses_canopen_images(const notcurses *nc __attribute__((unused)))
int ncvisual_bounding_box(const ncvisual *ncv, int *leny, int *lenx, int *offy, int *offx)
int ncvisual_decode(ncvisual *nc)
ncplane * ncvisual_render_pixels(notcurses *nc, ncvisual *ncv, const struct blitset *bset, int placey, int placex, const ncvgeom *geom, ncplane *n, uint64_t flags, uint32_t transcolor, int pxoffy, int pxoffx)
ncvisual * ncvisual_from_rgb_packed(const void *rgba, int rows, int rowstride, int cols, int alpha)
void * rgb_loose_to_rgba(const void *data, int rows, int *rowstride, int cols, int alpha)
void ncvisual_printbanner(fbuf *f)
ncvisual_implementation * visual_implementation
int ncvisual_init(int logl)
int ncvisual_set_yx(const struct ncvisual *n, unsigned y, unsigned x, uint32_t pixel)
int ncvisual_resize(ncvisual *n, int rows, int cols)
ncvisual * ncvisual_from_file(const char *filename)
int ncvisual_geom_inner(const tinfo *ti, const ncvisual *n, const struct ncvisual_options *vopts, ncvgeom *geom, const struct blitset **bset, unsigned *disppixy, unsigned *disppixx, unsigned *outy, unsigned *outx, int *placey, int *placex)
void ncvisual_details_seed(struct ncvisual *ncv)
ncplane * ncvisual_subtitle_plane(ncplane *parent, const ncvisual *ncv)
int ncvisual_resize_noninterpolative(ncvisual *n, int rows, int cols)
int ncvisual_decode_loop(ncvisual *nc)
int ncvisual_rotate(ncvisual *ncv, double rads)
bool notcurses_canopen_videos(const notcurses *nc __attribute__((unused)))
ncvisual * ncvisual_from_plane(const ncplane *n, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx)
int ncvisual_stream(notcurses *nc, ncvisual *ncv, float timescale, ncstreamcb streamer, const struct ncvisual_options *vopts, void *curry)
void ncvisual_destroy(ncvisual *ncv)
int ncvisual_geom(const notcurses *nc, const ncvisual *n, const struct ncvisual_options *vopts, ncvgeom *geom)
int ncvisual_simple_streamer(ncvisual *ncv, struct ncvisual_options *vopts, const struct timespec *tspec, void *curry)
int ncvisual_polyfill_yx(ncvisual *n, unsigned y, unsigned x, uint32_t rgba)
ncvisual * ncvisual_from_palidx(const void *pdata, int rows, int rowstride, int cols, int palsize, int pstride, const uint32_t *palette)
ncvisual * ncvisual_create(void)
int ncvisual_at_yx(const ncvisual *n, unsigned y, unsigned x, uint32_t *pixel)
void * bgra_to_rgba(const void *data, int rows, int *rowstride, int cols, int alpha)
int ncvisual_blit_internal(const ncvisual *ncv, int rows, int cols, ncplane *n, const struct blitset *bset, const blitterargs *barg)
ncplane * ncvisual_render_cells(ncvisual *ncv, const struct blitset *bset, int placey, int placex, ncvgeom *geom, ncplane *n, uint64_t flags, uint32_t transcolor)
ncvisual * ncvisual_from_rgb_loose(const void *rgba, int rows, int rowstride, int cols, int alpha)
ncplane * ncvisual_blit(notcurses *nc, ncvisual *ncv, const struct ncvisual_options *vopts)
ncvisual * ncvisual_from_sixel(const char *s, unsigned leny, unsigned lenx)