[pixel] derivce location for raster from plane

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

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

@ -922,7 +922,9 @@ static int
rasterize_sprixels(notcurses* nc, FILE* out){
for(sprixel* s = nc->sprixelcache ; s ; s = s->next){
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;
}
if(ncfputs(s->glyph, out) < 0){

Loading…
Cancel
Save