view: use quadblitter

This commit is contained in:
nick black 2020-06-14 04:31:00 -04:00
parent 64b07fcd0b
commit 222c52e10c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@ dragonmayer(struct ncvisual* ncv, const char* str, int iters){
case '+': { int tmp = dy; dy = -dx; dx = tmp; break; }
case '-': { int tmp = -dy; dy = dx; dx = tmp; break; }
case 'F': // FIXME want a line
ncpixel_set_r(&pixel, 0xb0 - (iters * 0x10));
if(ncvisual_set_yx(ncv, y, x, pixel) == 0){
++total;
}
@ -79,7 +80,7 @@ int dragon_demo(struct notcurses* nc){
}
free(rgba);
struct timespec scaled;
timespec_div(&demodelay, 4, &scaled);
timespec_div(&demodelay, 8, &scaled);
int lasttotal = 0;
int iters = 0;
int r = 0;

View File

@ -15,6 +15,7 @@ view_video_demo(struct notcurses* nc){
struct ncvisual_options vopts = {
.scaling = NCSCALE_STRETCH,
.n = ncp,
.blitter = NCBLIT_2x2,
};
int ret = ncvisual_stream(nc, ncv, &err, 2.0/3.0 * delaymultiplier,
demo_simple_streamer, &vopts, NULL);
@ -79,6 +80,7 @@ view_images(struct notcurses* nc, struct ncplane* nstd, int dimy, int dimx){
struct ncvisual_options vopts = {
.n = dsplane,
.scaling = NCSCALE_STRETCH,
.blitter = NCBLIT_2x2,
};
if(ncvisual_render(nc, ncv2, &vopts) == NULL){
ncvisual_destroy(ncv2);