|
|
|
@ -450,6 +450,8 @@ typedef struct tinfo {
|
|
|
|
|
// means leaving out the pixels (and likely resizes the string). for kitty,
|
|
|
|
|
// this means dialing down their alpha to 0 (in equivalent space).
|
|
|
|
|
int (*pixel_cell_wipe)(const struct notcurses* nc, sprixel* s, int y, int x);
|
|
|
|
|
// perform the inverse of pixel_cell_wipe, restoring an annihilated sprixcell.
|
|
|
|
|
int (*pixel_rebuild)(const struct notcurses* nc, sprixel* s, int y, int x);
|
|
|
|
|
int (*pixel_remove)(int id, FILE* out); // kitty only, issue actual delete command
|
|
|
|
|
int (*pixel_init)(int fd); // called when support is detected
|
|
|
|
|
int (*pixel_draw)(const struct notcurses* n, const struct ncpile* p, sprixel* s, FILE* out);
|
|
|
|
@ -922,7 +924,9 @@ int sixel_wipe(const notcurses* nc, sprixel* s, int ycell, int xcell);
|
|
|
|
|
// nulls out a cell from a kitty bitmap via changing the alpha value
|
|
|
|
|
// throughout to 0. the same trick doesn't work on sixel, but there we
|
|
|
|
|
// can just print directly over the bitmap.
|
|
|
|
|
int kitty_wipe(const notcurses* nc, sprixel* s, int y, int x);
|
|
|
|
|
int kitty_wipe(const notcurses* nc, sprixel* s, int ycell, int xcell);
|
|
|
|
|
int sixel_rebuild(const notcurses* nc, sprixel* s, int ycell, int xcell);
|
|
|
|
|
int kitty_rebuild(const notcurses* nc, sprixel* s, int ycell, int xcell);
|
|
|
|
|
|
|
|
|
|
void sprixel_free(sprixel* s);
|
|
|
|
|
void sprixel_hide(sprixel* s);
|
|
|
|
@ -960,6 +964,11 @@ sprite_destroy(const notcurses* nc, const ncpile* p, FILE* out, sprixel* s){
|
|
|
|
|
return nc->tcache.pixel_destroy(nc, p, out, s);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline int
|
|
|
|
|
sprite_rebuild(const notcurses* nc, sprixel* s, int ycell, int xcell){
|
|
|
|
|
return nc->tcache.pixel_rebuild(nc, s, ycell, xcell);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
|
clamp_to_sixelmax(const tinfo* t, int* y, int* x){
|
|
|
|
|
if(t->sixel_maxy && *y > t->sixel_maxy){
|
|
|
|
|