mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
visual: take placey into account for row calculation
This commit is contained in:
parent
1e69b48bbd
commit
0ff59e5a95
@ -40,7 +40,7 @@ greatscott(struct notcurses* nc){
|
||||
return NULL;
|
||||
}
|
||||
struct ncvisual_options vopts = {
|
||||
.y = 1,
|
||||
.y = 2,
|
||||
.x = NCALIGN_CENTER,
|
||||
.blitter = NCBLIT_PIXEL,
|
||||
.scaling = NCSCALE_SCALE,
|
||||
|
@ -559,7 +559,7 @@ int sixel_wipe(const notcurses* nc, sprixel* s, int ycell, int xcell){
|
||||
(void)nc;
|
||||
if(s->n->tacache[s->dimx * ycell + xcell] == SPRIXCELL_ANNIHILATED){
|
||||
//fprintf(stderr, "CACHED WIPE %d %d/%d\n", s->id, ycell, xcell);
|
||||
return 1; // already annihilated, but still must draw glyph
|
||||
return 1; // already annihilated FIXME but 0 breaks things
|
||||
}
|
||||
change_p2(s->glyph, SIXEL_P2_TRANS);
|
||||
return -1;
|
||||
|
@ -624,7 +624,10 @@ ncplane* ncvisual_render_pixels(notcurses* nc, ncvisual* ncv, const struct blits
|
||||
if(n == NULL){ // create plane
|
||||
if(scaling != NCSCALE_NONE && scaling != NCSCALE_NONE_HIRES){
|
||||
notcurses_term_dim_yx(nc, &disprows, &dispcols);
|
||||
--disprows; // some terminals scroll when bitmaps hit the last line
|
||||
if(!(flags & NCVISUAL_OPTION_VERALIGNED)){
|
||||
// some terminals scroll when bitmaps hit the last line
|
||||
disprows -= (placey + 1);
|
||||
}
|
||||
dispcols *= nc->tcache.cellpixx;
|
||||
disprows *= nc->tcache.cellpixy;
|
||||
clamp_to_sixelmax(&nc->tcache, &disprows, &dispcols);
|
||||
|
Loading…
x
Reference in New Issue
Block a user