From f5ec1406fea2f6fd446fe5714b8cae4ca2e708d8 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 9 Oct 2021 11:15:15 -0400 Subject: [PATCH] [uniblocks] fill in background in chunk --- src/demo/unicodeblocks.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/demo/unicodeblocks.c b/src/demo/unicodeblocks.c index 38e3d365a..1ed929cf8 100644 --- a/src/demo/unicodeblocks.c +++ b/src/demo/unicodeblocks.c @@ -102,12 +102,15 @@ draw_block(struct ncplane* nn, uint32_t blockstart){ int chunk; for(chunk = 0 ; chunk < BLOCKSIZE / CHUNKSIZE ; ++chunk){ int z; + ncplane_set_bg_rgb8(nn, 8 * chunk, 8 * chunk, 8 * chunk); for(z = 0 ; z < CHUNKSIZE ; ++z){ uint32_t w = blockstart + chunk * CHUNKSIZE + z; // problematic characters FIXME (see TERMINALS.md) if(w != 0x070f && w != 0x08e2 && w != 0x06dd){ + if(ncplane_putstr_yx(nn, chunk + 1, z * 2 + 1, " ") < 0){ + return -1; + } ncplane_set_fg_rgb8(nn, 0xad + z * 2, 0xff, 0x2f - z * 2); - ncplane_set_bg_rgb8(nn, 8 * chunk, 8 * chunk, 8 * chunk); if(ncplane_putwc_yx(nn, chunk + 1, z * 2 + 1, w) < 0){ return -1; }