mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
[raster] second pass on sprixel rasterization #1487
This commit is contained in:
parent
d813a66581
commit
38a5e16f85
@ -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…
x
Reference in New Issue
Block a user