add a bit-bang row

This commit is contained in:
tTh 2022-10-30 13:06:36 +01:00
parent a02b725ae0
commit 0cb40ae2a0
2 changed files with 11 additions and 2 deletions

View File

@ -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 */

View File

@ -50,7 +50,7 @@ for (x=0; x<fimg->width; x++) {
fimg_plot_rgb(fimg, x, y, fr, fg, fb);
}
k = fimg->height / 4;
k = (fimg->height / 4) + 20;
for (x=0; x<fimg->width; x++) {
val = ((double)x / (double)fimg->width) * dval;
for (y=0; y<20; y++) {
@ -60,6 +60,15 @@ for (x=0; x<fimg->width; x++) {
// fprintf(stderr, " %6d %f\n", x, val);
}
k = (fimg->height / 4) + 90;
for (x=0; x<fimg->width; 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;
}
/* --------------------------------------------------------------------- */