keller: use NCSCALE_SCALE for NCBLIT_PIXEL

pull/1403/head
nick black 4 years ago
parent 660d25eb4a
commit 3574e3ec2f
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -15,7 +15,7 @@ visualize(struct notcurses* nc, struct ncvisual* ncv){
};
for(size_t i = 0 ; i < sizeof(bs) / sizeof(*bs) ; ++i){
struct ncvisual_options vopts = {
.scaling = bs[i] == NCBLIT_PIXEL ? NCSCALE_NONE : NCSCALE_STRETCH,
.scaling = bs[i] == NCBLIT_PIXEL ? NCSCALE_SCALE : NCSCALE_STRETCH,
.blitter = bs[i],
.n = notcurses_stdplane(nc),
.y = 1,
@ -24,6 +24,7 @@ visualize(struct notcurses* nc, struct ncvisual* ncv){
int scalex, scaley, truey, truex;
ncvisual_geom(nc, ncv, &vopts, &truey, &truex, &scaley, &scalex);
vopts.x = (ncplane_dim_x(notcurses_stdplane(nc)) - truex / scalex) / 2;
//fprintf(stderr, "X: %d truex: %d sclaex: %d\n", vopts.x, truex, scalex);
ncplane_set_fg_rgb(vopts.n, 0xffffff);
ncplane_set_bg_rgb(vopts.n, 0);
ncplane_erase(vopts.n);

Loading…
Cancel
Save