From 2f23409d97b473a11204143ba886d11a293d60c2 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 20 Jun 2021 07:26:55 -0400 Subject: [PATCH] finish out interp PoC #1796 --- src/poc/interp.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/poc/interp.c b/src/poc/interp.c index 2f471e3a5..fd614fce5 100644 --- a/src/poc/interp.c +++ b/src/poc/interp.c @@ -41,8 +41,35 @@ interp(struct notcurses* nc, int cellpixy, int cellpixx){ if(ncvisual_render(nc, ncv, &vopts) == NULL){ return -1; } -notcurses_debug(nc, stderr); + popts.x += ncplane_dim_x(scalepni) + 1; + struct ncplane* resizep = ncplane_create(stdn, &popts); + if(resizep == NULL){ + return -1; + } + if(ncvisual_resize(ncv, popts.rows * cellpixy, popts.cols * cellpixx)){ + return -1; + } + vopts.flags = 0; + vopts.n = resizep; + vopts.scaling = NCSCALE_NONE; + if(ncvisual_render(nc, ncv, &vopts) == NULL){ + return -1; + } ncvisual_destroy(ncv); + ncv = ncvisual_from_rgb_packed(randrgb, cellpixy, cellpixx * 3, cellpixx, 0xff); + popts.x += ncplane_dim_x(scalepni) + 1; + struct ncplane* inflatep = ncplane_create(stdn, &popts); + if(inflatep == NULL){ + return -1; + } + vopts.n = inflatep; + if(ncvisual_resize_noninterpolative(ncv, popts.rows * cellpixy, popts.cols * cellpixx)){ + return -1; + } + if(ncvisual_render(nc, ncv, &vopts) == NULL){ + return -1; + } +notcurses_debug(nc, stderr); notcurses_render(nc); ncplane_destroy(ncvp); ncplane_destroy(scalep);