new pattern (mircol_1) in mkfimg

This commit is contained in:
tth
2021-05-12 12:04:55 +02:00
parent 4a52c16e40
commit 07dde749ed
3 changed files with 28 additions and 4 deletions

View File

@@ -86,6 +86,24 @@ for (y=1; y<fimg->height; y++) {
return 0;
}
/* --------------------------------------------------------------------- */
int fimg_mircol_1(FloatImg *dst, float mval)
{
int x, y;
float fx, fy, rgb[3];
for (y=0; y<dst->height; y++) {
fy = (float)y / (float)dst->height;
for (x=0; x<dst->width; x++) {
fx = (float)x / (float)dst->width;
rgb[0] = mval * fx;
rgb[1] = mval * ((fx+fy)/2.0);
rgb[2] = mval * fy;
fimg_put_rgb(dst, x, y, rgb);
}
}
return -1;
}
/* --------------------------------------------------------------------- */
int fimg_multirandom(FloatImg *fimg, long nbpass)
{
int foo, x, y;