[raster] second pass on sprixel rasterization #1487

dankamongmen/thirdpass
nick black 3 years ago
parent d813a66581
commit 38a5e16f85
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -51,8 +51,7 @@ Default margins are all 0 and default scaling is **stretch**. The full
rendering area will thus be used. Using **-m**, margins can be supplied.
Provide a single number to set all four margins to the same value, or four
comma-delimited values for the top, right, bottom, and left margins
respectively. Top and bottom margins are ignored when **-k** is used. Negative
margins are illegal.
respectively. Negative margins are illegal.
Scaling mode **stretch** resizes the object to match the target rendering
area exactly. Unless a blitter is specified with **-b**, **stretch** will use

@ -941,7 +941,7 @@ rasterize_sprixels(notcurses* nc, const ncpile* p, FILE* out){
ncplane_yx(s->n, &y, &x);
y += s->y;
x += s->x;
//fprintf(stderr, "DRAWING BITMAP %d AT %d/%d for %p\n", s->id, y + nc->stdplane->absy, x + nc->stdplane->absx, s->n);
fprintf(stderr, "DRAWING BITMAP %d AT %d/%d for %p\n", s->id, y + nc->stdplane->absy, x + nc->stdplane->absx, s->n);
if(goto_location(nc, out, y + nc->stdplane->absy, x + nc->stdplane->absx)){
return -1;
}
@ -952,7 +952,7 @@ rasterize_sprixels(notcurses* nc, const ncpile* p, FILE* out){
nc->rstate.hardcursorpos = true;
parent = &s->next;
}else if(s->invalidated == SPRIXEL_HIDE){
//fprintf(stderr, "OUGHT HIDE %d [%dx%d @ %d/%d] %p\n", s->id, s->dimy, s->dimx, s->y, s->x, s);
fprintf(stderr, "OUGHT HIDE %d [%dx%d @ %d/%d] %p\n", s->id, s->dimy, s->dimx, s->y, s->x, s);
int r = sprite_destroy(nc, p, out, s);
if(r < 0){
return -1;
@ -1105,6 +1105,9 @@ notcurses_rasterize_inner(notcurses* nc, const ncpile* p, FILE* out){
if(rasterize_core(nc, p, out)){
return -1;
}
if(rasterize_sprixels(nc, p, out) < 0){
return -1;
}
if(fflush(out)){
return -1;
}

Loading…
Cancel
Save