mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
ncdirectf_geom: approximate rcell{y,x} #1665
This commit is contained in:
parent
d3a1a16ec1
commit
8ff2499b44
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user