diff --git a/src/demo/dragon.c b/src/demo/dragon.c index 939c6c6c4..d30dce81b 100644 --- a/src/demo/dragon.c +++ b/src/demo/dragon.c @@ -49,19 +49,19 @@ int dragon_demo(struct notcurses* nc){ done = false; int dimy, dimx; struct ncplane* n = notcurses_stddim_yx(nc, &dimy, &dimx); + --dimy; // don't disturb the menu bar // we use a Lindenmayer string rewriting system. the classic dragon curve // system is X -> X+YF+, Y -> -FX-Y, where F is forward, - is turn left, and // + is turn right. const char LINDENSTART[] = "FX"; - const int SCALE = 1; dimy *= 2; dimx *= 2; int dxstart, dystart; if(dimy > dimx){ dystart = 0; - dxstart = SCALE; + dxstart = 1; }else{ - dystart = SCALE; + dystart = 1; dxstart = 0; } size_t fbbytes = sizeof(uint32_t) * dimy * dimx; @@ -101,6 +101,7 @@ int dragon_demo(struct notcurses* nc){ struct ncvisual_options vopts = { .n = n, .blitter = NCBLIT_2x2, + .y = 1, }; if(ncvisual_render(nc, ncv, &vopts) == NULL){ ncvisual_destroy(ncv); @@ -108,6 +109,7 @@ int dragon_demo(struct notcurses* nc){ } DEMO_RENDER(nc); demo_nanosleep(nc, &scaled); + ncplane_erase(n); }while(lasttotal != r); ncvisual_destroy(ncv); return 0; diff --git a/src/demo/view.c b/src/demo/view.c index 93abd862d..a0b0908e2 100644 --- a/src/demo/view.c +++ b/src/demo/view.c @@ -16,6 +16,7 @@ view_video_demo(struct notcurses* nc){ .scaling = NCSCALE_STRETCH, .n = ncp, .blitter = NCBLIT_2x2, + .y = 1, }; int ret = ncvisual_stream(nc, ncv, &err, 2.0/3.0 * delaymultiplier, demo_simple_streamer, &vopts, NULL); @@ -81,6 +82,7 @@ view_images(struct notcurses* nc, struct ncplane* nstd, int dimy, int dimx){ .n = dsplane, .scaling = NCSCALE_STRETCH, .blitter = NCBLIT_2x2, + .y = 1, }; if(ncvisual_render(nc, ncv2, &vopts) == NULL){ ncvisual_destroy(ncv2);