sprixel_debug: print plane location

pull/1573/head
nick black 3 years ago
parent d8004ef508
commit 0cddfdde7b
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1156,6 +1156,7 @@ int ncdirect_stream(ncdirect* n, const char* filename, ncstreamcb streamer,
ncplane_dim_yx(v, &y, &x);
ncdirect_raster_frame(n, v, (vopts->flags & NCVISUAL_OPTION_HORALIGNED) ? vopts->x : 0);
streamer(ncv, vopts, NULL, curry);
// FIXME need to issue a kitty-kill when appropriate, how?
}while(ncvisual_decode(ncv) == 0);
ncvisual_destroy(ncv);
return 0;

@ -6,8 +6,10 @@ static uint32_t sprixelid_nonce;
static inline void
sprixel_debug(FILE* out, const sprixel* s){
fprintf(out, "Sprixel %d (%p) %dx%d (%dx%d) n: %p state: %d\n",
s->id, s, s->dimy, s->dimx, s->pixy, s->pixx, s->n, s->invalidated);
fprintf(out, "Sprixel %d (%p) %dx%d (%dx%d) @%d/%d state: %d\n",
s->id, s, s->dimy, s->dimx, s->pixy, s->pixx,
s->n ? s->n->absy : 0, s->n ? s->n->absx : 0,
s->invalidated);
if(s->n){
int idx = 0;
for(int y = 0 ; y < s->dimy ; ++y){

@ -678,6 +678,7 @@ ncplane* ncvisual_render_pixels(notcurses* nc, ncvisual* ncv, const struct blits
clamp_to_sixelmax(&nc->tcache, &disprows, &dispcols);
}
}
// FIXME why are we allowing arbitrary location within a plane?
if(flags & NCVISUAL_OPTION_HORALIGNED){
if(placex == NCALIGN_CENTER){
placex = (ncplane_dim_x(n) - dispcols / nc->tcache.cellpixx) / 2;

Loading…
Cancel
Save