[xray] put streaming plane back above scrolling #1518

This commit is contained in:
nick black 2021-04-10 11:08:19 -04:00 committed by Nick Black
parent bac7d634d9
commit 34bcbb505b
3 changed files with 5 additions and 6 deletions

View File

@ -65,9 +65,7 @@ perframecb(struct ncvisual* ncv, struct ncvisual_options* vopts,
// only need these two steps done once, but we can't do them in
// main() due to the plane being created in ncvisual_stream() =[
ncplane_set_resizecb(vopts->n, ncplane_resize_maximize);
// until #1518 is done, the stream isn't transparent, and thus it
// can obstruct the slider if there are few enough rows. FIXME
ncplane_move_above(vnewplane, vopts->n);
ncplane_move_above(vopts->n, vnewplane);
struct notcurses* nc = ncplane_notcurses(vopts->n);
static int frameno = 0;
@ -106,7 +104,9 @@ int xray_demo(struct notcurses* nc){
.scaling = NCSCALE_SCALE_HIRES,
.blitter = NCBLIT_PIXEL,
.flags = NCVISUAL_OPTION_NODEGRADE // to test for NCBLIT_PIXEL
| NCVISUAL_OPTION_VERALIGNED | NCVISUAL_OPTION_HORALIGNED,
| NCVISUAL_OPTION_VERALIGNED | NCVISUAL_OPTION_HORALIGNED
| NCVISUAL_OPTION_ADDALPHA,
.transcolor = 0,
};
float dm = 0;
// returns 0 if the selected blitter isn't available

View File

@ -60,7 +60,6 @@ base64_rgba3(const uint32_t* pixels, size_t pcount, char* b64, bool wipe[static
unsigned g = ncpixel_g(pixel);
unsigned b = ncpixel_b(pixel);
unsigned a = wipe[0] ? 0 : rgba_trans_p(pixel, transcolor) ? 0 : 255;
//fprintf(stderr, "WIPE: %d %d %d\n", wipe[0], wipe[1], wipe[2]);
b64[0] = b64subs[(r & 0xfc) >> 2];
b64[1] = b64subs[(r & 0x3 << 4) | ((g & 0xf0) >> 4)];
b64[2] = b64subs[((g & 0xf) << 2) | ((b & 0xc0) >> 6)];

View File

@ -147,7 +147,7 @@ extract_color_table(const uint32_t* data, int linesize, int begy, int begx, int
for(int sy = visy ; sy < (begy + leny) && sy < visy + 6 ; ++sy){ // offset within sprixel
const uint32_t* rgb = (data + (linesize / 4 * sy) + visx);
int txyidx = (sy / cdimy) * cols + (visx / cdimx);
if(rgba_trans_p(ncpixel_a(*rgb), transcolor)){
if(rgba_trans_p(*rgb, transcolor)){
if(tacache[txyidx] == SPRIXCELL_NORMAL){
tacache[txyidx] = SPRIXCELL_CONTAINS_TRANS;
}