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;
475 ncpixel_set_a(dst, alpha);
476 ncpixel_set_r(dst, ncpixel_r(*src));
477 ncpixel_set_g(dst, ncpixel_g(*src));
478 ncpixel_set_b(dst, ncpixel_b(*src));
482 *rowstride = cols * 4;
487 if(*rowstride < cols * 3){
490 uint32_t* ret = malloc(4 * cols * rows);
492 for(
int y = 0 ;
y < rows ; ++
y){
493 for(
int x = 0 ;
x < cols ; ++
x){
494 const unsigned char* src = (
const unsigned char*)data + *rowstride *
y +
x;
495 uint32_t* dst = ret + cols *
y +
x;
497 ncpixel_set_a(dst, alpha);
498 ncpixel_set_r(dst, src[0]);
499 ncpixel_set_g(dst, src[1]);
500 ncpixel_set_b(dst, src[2]);
504 *rowstride = cols * 4;
508void*
bgra_to_rgba(
const void* data,
int rows,
int* rowstride,
int cols,
int alpha){
512 if(*rowstride < cols * 4){
515 uint32_t* ret = malloc(4 * cols * rows);
517 for(
int y = 0 ;
y < rows ; ++
y){
518 for(
int x = 0 ;
x < cols ; ++
x){
519 const uint32_t* src = (
const uint32_t*)data + (*rowstride / 4) *
y +
x;
520 uint32_t* dst = ret + cols *
y +
x;
522 ncpixel_set_a(dst, alpha);
523 ncpixel_set_r(dst, ncpixel_b(*src));
524 ncpixel_set_g(dst, ncpixel_g(*src));
525 ncpixel_set_b(dst, ncpixel_r(*src));
529 *rowstride = cols * 4;
538 int* offy,
int* offx){
540 unsigned rcol = UINT_MAX;
548 for(trow = 0 ; trow <
ncv->pixy ; ++trow){
549 for(
unsigned x = 0 ;
x <
ncv->pixx ; ++
x){
550 uint32_t rgba =
ncv->data[trow *
ncv->rowstride / 4 +
x];
555 for(xr =
ncv->pixx - 1 ; xr >
x ; --xr){
556 rgba =
ncv->data[trow *
ncv->rowstride / 4 + xr];
569 if(trow ==
ncv->pixy){
579 for(brow =
ncv->pixy - 1 ; brow > trow ; --brow){
581 for(
x = 0 ;
x <
ncv->pixx ; ++
x){
582 uint32_t rgba =
ncv->data[brow *
ncv->rowstride / 4 +
x];
588 for(xr =
ncv->pixx - 1 ; xr >
x && xr > rcol ; --xr){
589 rgba =
ncv->data[brow *
ncv->rowstride / 4 + xr];
606 for(
unsigned y = trow + 1 ;
y < brow ; ++
y){
607 for(
unsigned x = 0 ;
x < lcol ; ++
x){
608 uint32_t rgba =
ncv->data[
y *
ncv->rowstride / 4 +
x];
614 for(
unsigned x =
ncv->pixx - 1 ;
x > rcol ; --
x){
615 uint32_t rgba =
ncv->data[
y *
ncv->rowstride / 4 +
x];
623 *leny = brow - trow + 1;
625 *lenx = rcol - lcol + 1;
627 return *leny * *lenx;
644rotate_point(
int*
y,
int*
x,
double stheta,
double ctheta,
int centy,
int centx){
646 const int convx = *
x - centx;
647 const int convy = *
y - centy;
649 *
x = round(convx * ctheta - convy * stheta);
650 *
y = round(convx * stheta + convy * ctheta);
658rotate_bounding_box(
double stheta,
double ctheta,
int* leny,
int* lenx,
659 int* offy,
int* offx){
664 center_box(¢y, ¢x);
667 rotate_point(ys, xs, stheta, ctheta, centy, centx);
671 rotate_point(ys + 1, xs + 1, stheta, ctheta, centy, centx);
675 rotate_point(ys + 2, xs + 2, stheta, ctheta, centy, centx);
679 rotate_point(ys + 3, xs + 3, stheta, ctheta, centy, centx);
685 for(
size_t i = 1 ; i <
sizeof(xs) /
sizeof(*xs) ; ++i){
700 *leny = brow - trow + 1;
702 *lenx = rcol - lcol + 1;
704 return *leny * *lenx;
711 ncvisual_center(
ncv, ¢y, ¢x);
712 double stheta, ctheta;
723 logerror(
"couldn't find a bounding box");
727 bbarea = rotate_bounding_box(stheta, ctheta, &bby, &bbx, &bboffy, &bboffx);
729 logerror(
"couldn't rotate the visual (%d, %d, %d, %d)", bby, bbx, bboffy, bboffx);
732 int bbcentx = bbx, bbcenty = bby;
733 center_box(&bbcenty, &bbcentx);
736 uint32_t* data = malloc(bbarea * 4);
740 memset(data, 0, bbarea * 4);
742 for(
unsigned y = 0 ;
y <
ncv->pixy ; ++
y){
743 for(
unsigned x = 0 ;
x <
ncv->pixx ; ++
x){
744 int targx =
x, targy =
y;
745 rotate_point(&targy, &targx, stheta, ctheta, centy, centx);
746 if(targx > bboffx && targy > bboffy){
747 const int deconvx = targx - bboffx;
748 const int deconvy = targy - bboffy;
749 if(deconvy < bby && deconvx < bbx){
750 data[deconvy * bbx + deconvx] =
ncv->data[
y * (
ncv->rowstride / 4) +
x];
757 ncvisual_set_data(
ncv, data,
true);
760 ncv->rowstride = bbx * 4;
766pad_for_image(
size_t stride,
int cols){
769 }
else if(stride < cols * 4u){
781 logerror(
"rowstride %d not a multiple of 4", rowstride);
784 if(rowstride * 4 < cols || cols <= 0 || rows <= 0){
785 logerror(
"invalid rowstride or geometry");
791 ncv->rowstride = pad_for_image(rowstride, cols);
794 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
799 for(
int y = 0 ;
y < rows ; ++
y){
801 memcpy(data + (
ncv->rowstride *
y) / 4, (
const char*)rgba + rowstride *
y, rowstride);
803 ncvisual_set_data(
ncv, data,
true);
812 logerror(
"failed converting sixel to rgba");
821 int cols,
int alpha){
823 logerror(
"rowstride %d not a multiple of 3", rowstride);
826 if(rows <= 0 || cols <= 0 || rowstride < cols * 3){
827 logerror(
"illegal packed rgb geometry");
832 ncv->rowstride = pad_for_image(cols * 4, cols);
835 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
840 const unsigned char* src = rgba;
841 for(
int y = 0 ;
y < rows ; ++
y){
843 for(
int x = 0 ;
x < cols ; ++
x){
844 unsigned char r, g, b;
845 memcpy(&
r, src + rowstride *
y + 3 *
x, 1);
846 memcpy(&g, src + rowstride *
y + 3 *
x + 1, 1);
847 memcpy(&b, src + rowstride *
y + 3 *
x + 2, 1);
848 data[
y *
ncv->rowstride / 4 +
x] = 0;
849 ncpixel_set_a(&data[
y *
ncv->rowstride / 4 +
x], alpha);
850 ncpixel_set_r(&data[
y *
ncv->rowstride / 4 +
x],
r);
851 ncpixel_set_g(&data[
y *
ncv->rowstride / 4 +
x], g);
852 ncpixel_set_b(&data[
y *
ncv->rowstride / 4 +
x], b);
856 ncvisual_set_data(
ncv, data,
true);
863 int cols,
int alpha){
865 logerror(
"rowstride %d not a multiple of 4", rowstride);
868 if(rows <= 0 || cols <= 0 || rowstride < cols * 4){
869 logerror(
"illegal packed rgb geometry");
874 ncv->rowstride = pad_for_image(cols * 4, cols);
877 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
882 for(
int y = 0 ;
y < rows ; ++
y){
884 memcpy(data + (
ncv->rowstride *
y) / 4, (
const char*)rgba + rowstride *
y, rowstride);
885 for(
int x = 0 ;
x < cols ; ++
x){
886 ncpixel_set_a(&data[
y *
ncv->rowstride / 4 +
x], alpha);
889 ncvisual_set_data(
ncv, data,
true);
897 logerror(
"rowstride %d not a multiple of 4", rowstride);
900 if(rows <= 0 || cols <= 0 || rowstride < cols * 4){
906 ncv->rowstride = pad_for_image(rowstride, cols);
909 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
914 for(
int y = 0 ;
y < rows ; ++
y){
915 for(
int x = 0 ;
x < cols ; ++
x){
917 memcpy(&src, (
const char*)bgra +
y * rowstride +
x * 4, 4);
918 uint32_t* dst = &data[
ncv->rowstride *
y / 4 +
x];
920 ncpixel_set_a(dst, ncpixel_a(src));
921 ncpixel_set_r(dst, ncpixel_b(src));
922 ncpixel_set_g(dst, ncpixel_g(src));
923 ncpixel_set_b(dst, ncpixel_r(src));
927 ncvisual_set_data(
ncv, data,
true);
934 int cols,
int palsize,
int pstride,
935 const uint32_t* palette){
936 if(pstride <= 0 || rowstride % pstride){
937 logerror(
"bad pstride (%d) for rowstride (%d)", pstride, rowstride);
940 if(rows <= 0 || cols <= 0 || rowstride < cols * pstride){
941 logerror(
"illegal palimg geometry");
944 if(palsize > 256 || palsize <= 0){
945 logerror(
"palettes size (%d) is unsupported", palsize);
950 ncv->rowstride = pad_for_image(rowstride, cols);
953 uint32_t* data = malloc(
ncv->rowstride *
ncv->pixy);
958 for(
int y = 0 ;
y < rows ; ++
y){
959 for(
int x = 0 ;
x < cols ; ++
x){
960 int palidx = ((
const unsigned char*)pdata)[
y * rowstride +
x * pstride];
961 if(palidx >= palsize){
964 logerror(
"invalid palette idx %d >= %d", palidx, palsize);
967 uint32_t src = palette[palidx];
968 uint32_t* dst = &data[
ncv->rowstride *
y / 4 +
x];
969 if(ncchannel_default_p(src)){
972 ncpixel_set_a(dst, 255 - palidx);
973 ncpixel_set_r(dst, palidx);
974 ncpixel_set_g(dst, 220 - (palidx / 2));
975 ncpixel_set_b(dst, palidx);
982 ncvisual_set_data(
ncv, data,
true);
999 size_t dstride = pad_for_image(cols * 4, cols);
1000 uint32_t*
r = resize_bitmap(
n->data,
n->pixy,
n->pixx,
n->rowstride,
1001 rows, cols, dstride);
1005 ncvisual_set_data(
n,
r,
true);
1006 n->rowstride = dstride;
1020 int placey,
int placex,
1022 uint64_t flags, uint32_t transcolor){
1023 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);
1030 bargs.
flags = flags;
1058 ncplane*
n, uint64_t flags, uint32_t transcolor,
1059 int pxoffy,
int pxoffx){
1060 logdebug(
"pblit: rows/cols: %dx%d plane: %d/%d",
geom->rcelly,
geom->rcellx, ncplane_dim_y(
n), ncplane_dim_x(
n));
1068 bargs.
flags = flags;
1074 const ncpile* p = ncplane_pile_const(
n);
1075 if(
n->sprite ==
NULL){
1079 if((
n->tam = create_tam(
geom->rcelly,
geom->rcellx)) ==
NULL){
1084 if(
n->sprite->dimy !=
geom->rcelly ||
n->sprite->dimx !=
geom->rcellx){
1086 if((
n->tam = create_tam(
geom->rcelly,
geom->rcellx)) ==
NULL){
1090 n->sprite->dimx =
geom->rcellx;
1091 n->sprite->dimy =
geom->rcelly;
1131 cleanup_tam(
n->tam,
geom->rcelly,
geom->rcellx);
1146 memset(&fakevopts, 0,
sizeof(fakevopts));
1153 unsigned disppxy, disppxx, outy, outx;
1156 &disppxy, &disppxx, &outy, &outx,
1162 uint32_t transcolor = 0;
1164 transcolor = 0x1000000ull |
vopts->transcolor;
1186 loginfo(
"placing new plane: %d/%d @ %d/%d 0x%016" PRIx64, nopts.
rows, nopts.
cols, nopts.
y, nopts.
x, nopts.
flags);
1192 if((createdn =
n) ==
NULL){
1216 unsigned leny,
unsigned lenx){
1218 uint32_t* rgba =
ncplane_as_rgba(
n, blit, begy, begx, leny, lenx, &py, &px);
1223 unsigned dimy, dimx;
1245 const struct timespec* tspec,
void* curry){
1260 clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, tspec,
NULL);
1274 n->data[
y * (
n->rowstride / 4) +
x] = pixel;
1280 logerror(
"invalid coordinates %u/%u (%d/%d)",
y,
x,
n->pixy,
n->pixx);
1284 logerror(
"invalid coordinates %u/%u (%d/%d)",
y,
x,
n->pixy,
n->pixx);
1287 *pixel =
n->data[
y * (
n->rowstride / 4) +
x];
1295ncvisual_polyfill_core(
ncvisual*
n,
unsigned y,
unsigned x, uint32_t rgba, uint32_t match){
1296 struct topolyfill* stack = malloc(
sizeof(*stack));
1310 uint32_t* pixel = &
n->data[
y * (
n->rowstride / 4) +
x];
1311 if(*pixel == match && *pixel != rgba){
1316 if(create_polyfill_op(
y - 1,
x, &stack) ==
NULL){
1320 if(
y + 1 <
n->pixy){
1321 if(create_polyfill_op(
y + 1,
x, &stack) ==
NULL){
1326 if(create_polyfill_op(
y,
x - 1, &stack) ==
NULL){
1330 if(
x + 1 <
n->pixx){
1331 if(create_polyfill_op(
y,
x + 1, &stack) ==
NULL){
1359 uint32_t* pixel = &
n->data[
y * (
n->rowstride / 4) +
x];
1360 return ncvisual_polyfill_core(
n,
y,
x, rgba, *pixel);
__attribute__((nonnull(1)))
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)