new pattern (mircol_1) in mkfimg
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user