update channels in ncdirect palindex #1275

pull/1279/head
nick black 4 years ago
parent 797ef4b0ae
commit 478d7cb514
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -112,7 +112,7 @@ int fallin_demo(struct notcurses* nc){
// * newy/newx: actual geometry of current brick
// * usey/usex:
ncplane_greyscale(stdn);
for(int y = 0 ; y < dimy ; ++y){
for(int y = 1 ; y < dimy ; ++y){
int x = 0;
while(x < dimx){
if(usemap[y * dimx + x]){ // skip if we've already been copied

@ -529,12 +529,17 @@ int ncdirect_render_image(ncdirect* n, const char* file, ncalign_e align,
return ncdirect_raster_frame(n, faken, align);
}
// FIXME need to update channels
int ncdirect_set_fg_palindex(ncdirect* nc, int pidx){
if(channels_set_fg_palindex(&nc->channels, pidx) < 0){
return -1;
}
return term_emit("setaf", tiparm(nc->tcache.setaf, pidx), nc->ttyfp, false);
}
int ncdirect_set_bg_palindex(ncdirect* nc, int pidx){
if(channels_set_bg_palindex(&nc->channels, pidx) < 0){
return -1;
}
return term_emit("setab", tiparm(nc->tcache.setab, pidx), nc->ttyfp, false);
}

Loading…
Cancel
Save