From 0cb40ae2a0e8e3a54fb0064f94e43d5975e211a3 Mon Sep 17 00:00:00 2001 From: tTh Date: Sun, 30 Oct 2022 13:06:36 +0100 Subject: [PATCH] add a bit-bang row --- floatimg.h | 2 +- funcs/misc-plots.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/floatimg.h b/floatimg.h index e91d886d..f20fd1e8 100644 --- a/floatimg.h +++ b/floatimg.h @@ -20,7 +20,7 @@ * https://git.tetalab.org/tTh/FloatImg */ -#define FIMG_VERSION (202) +#define FIMG_VERSION (204) #define RELEASE_NAME ("noname") /* XXX add a test for stdint.h / uint32_t XXX */ diff --git a/funcs/misc-plots.c b/funcs/misc-plots.c index d24a2cbd..c5eb3561 100644 --- a/funcs/misc-plots.c +++ b/funcs/misc-plots.c @@ -50,7 +50,7 @@ for (x=0; xwidth; x++) { fimg_plot_rgb(fimg, x, y, fr, fg, fb); } -k = fimg->height / 4; +k = (fimg->height / 4) + 20; for (x=0; xwidth; x++) { val = ((double)x / (double)fimg->width) * dval; for (y=0; y<20; y++) { @@ -60,6 +60,15 @@ for (x=0; xwidth; x++) { // fprintf(stderr, " %6d %f\n", x, val); } +k = (fimg->height / 4) + 90; +for (x=0; xwidth; x++) { + val = ((x%8)<4) ? dval : 0.0; + for (y=0; y<20; y++) { + fimg_plot_rgb(fimg, x, k+y, val, val, val); + fimg_plot_rgb(fimg, x, k+y+20, dval-val, dval-val, dval-val); + } + } + return 0; } /* --------------------------------------------------------------------- */