Hi,
Daniel Egger <[EMAIL PROTECTED]> writes:
> for (y = PR->y; y < endy; y++)
> for (x = PR->x; x < endx; x++)
> {
> GimpRGB color;
>
> gradient_render_pixel (x, y, &color, rbd);
>
> gradient_dither (dest, dither_rand, color.r);
> gradient_dither (dest, dither_rand, color.g);
> gradient_dither (dest, dither_rand, color.b);
> gradient_dither (dest, dither_rand, color.a);
> }
Should probably note that
gradient_dither (dest, rng, value)
expands to
{
gdouble ftmp = value * 255.0;
gint itmp = ftmp;
if (g_rand_double (rng) > ftmp - itmp)
*dest++ = itmp;
else
*dest++ = MIN (itmp + 1, 255);
}
Sven
_______________________________________________
Gimp-developer mailing list
[email protected]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer