diff --git a/include/notcurses/direct.h b/include/notcurses/direct.h index 95844affd..76483b450 100644 --- a/include/notcurses/direct.h +++ b/include/notcurses/direct.h @@ -336,7 +336,7 @@ typedef struct ncvgeom { int pixy, pixx; // true pixel geometry of ncvisual data int cdimy, cdimx; // terminal cell geometry when this was calculated int rpixy, rpixx; // rendered pixel geometry - int rcelly, rcellx; // rendered cell geometry FIXME not yet filled in + int rcelly, rcellx; // rendered cell geometry int scaley, scalex; // pixels per filled cell // only defined for NCBLIT_PIXEL int maxpixely, maxpixelx; diff --git a/src/lib/direct.c b/src/lib/direct.c index cf3877622..7daa51f91 100644 --- a/src/lib/direct.c +++ b/src/lib/direct.c @@ -1263,11 +1263,15 @@ int ncdirectf_geom(ncdirect* n, ncdirectf* frame, geom->maxpixely = n->tcache.sixel_maxy; geom->maxpixelx = n->tcache.sixel_maxx; const struct blitset* bset; - geom->rcelly = geom->rcellx = -1; // FIXME int r = ncvisual_blitset_geom(NULL, &n->tcache, frame, &vopts, &geom->pixy, &geom->pixx, &geom->scaley, &geom->scalex, &geom->rpixy, &geom->rpixx, &bset); + // FIXME ncvisual_blitset_geom() ought calculate these two for us; until + // then, derive them ourselves. the row count might be short by one if + // we're using sixel, and we're not a multiple of 6 + geom->rcelly = geom->pixy / geom->scaley; + geom->rcellx = geom->pixx / geom->scalex; if(r == 0 && blitter){ *blitter = bset->geom; }