[pixel] hook up kitty image destroy #1401

pull/1418/head
nick black 3 years ago committed by Nick Black
parent be0a52676a
commit 47e2be7dc5

@ -78,7 +78,10 @@ write_kitty_data(FILE* fp, int linesize, int leny, int lenx, const uint32_t* dat
//fprintf(stderr, "total: %d chunks = %d, s=%d,v=%d\n", total, chunks, lenx, leny);
while(chunks--){
if(totalout == 0){
fprintf(fp, "\e_Gf=32,s=%d,v=%d,a=T%s;", lenx, leny, chunks > 1 ? ",m=1" : "");
// FIXME need to send image id from notcurses struct
static int horror = 1;
fprintf(fp, "\e_Gf=32,s=%d,v=%d,i=%d,q=1,a=T%s;", lenx, leny, horror, chunks > 1 ? ",m=1" : "");
++horror;
}else{
fprintf(fp, "\e_Gm=%d;", chunks ? 1 : 0);
}

@ -951,6 +951,7 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
ret->margin_r = opts->margin_r;
ret->cursory = ret->cursorx = -1;
ret->sprixelcache = NULL;
ret->sprixelnonce = 1;
memset(&ret->stats, 0, sizeof(ret->stats));
memset(&ret->stashed_stats, 0, sizeof(ret->stashed_stats));
reset_stats(&ret->stats);

@ -923,7 +923,11 @@ emit_bg_palindex(notcurses* nc, FILE* out, const nccell* srccell){
}
int sprite_kitty_annihilate(notcurses* nc, const ncpile* p, FILE* out, sprixel* s){
// FIXME
(void)p;
(void)nc;
if(fprintf(out, "\e_Ga=d,d=i,i=%d,q=1\e\\", s->id) < 0){
return 0;
}
return 0;
}

@ -12,7 +12,7 @@ handle(struct notcurses* nc, const char *fn){
struct ncplane* stdn = notcurses_stddim_yx(nc, &dimy, &dimx);
uint64_t channels = CHANNELS_RGB_INITIALIZER(100, 140, 100, 140, 100, 140);
ncplane_set_base(stdn, "a", 0, channels);
for(int x = 0 ; x < dimx ; x += 5){
for(int x = 0 ; x < dimx ; x += 15){
struct ncvisual_options vopts = {
.x = x,
.scaling = NCSCALE_NONE_HIRES,

Loading…
Cancel
Save