[pixel] derivce location for raster from plane

pull/1418/head
nick black 4 years ago committed by Nick Black
parent 8df17b463f
commit 70fb40ea5a

@ -350,9 +350,7 @@ typedef struct ncpile {
typedef struct sprixel { typedef struct sprixel {
char* glyph; // glyph; can be quite large char* glyph; // glyph; can be quite large
int id; // embedded into glusters field of nccell int id; // embedded into glusters field of nccell
int y, x; // position relative to the standard plane ncplane* n; // associated ncplane, provides location and size
int cols;
int rows;
int invalidated; int invalidated;
struct sprixel* next; struct sprixel* next;
} sprixel; } sprixel;

@ -922,7 +922,9 @@ static int
rasterize_sprixels(notcurses* nc, FILE* out){ rasterize_sprixels(notcurses* nc, FILE* out){
for(sprixel* s = nc->sprixelcache ; s ; s = s->next){ for(sprixel* s = nc->sprixelcache ; s ; s = s->next){
if(s->invalidated){ if(s->invalidated){
if(goto_location(nc, out, s->y, s->x)){ int y, x;
ncplane_yx(s->n, &y, &x);
if(goto_location(nc, out, y, x)){
return -1; return -1;
} }
if(ncfputs(s->glyph, out) < 0){ if(ncfputs(s->glyph, out) < 0){

Loading…
Cancel
Save