void
draw_gradient (int r1, int g1, int b1, int r2, int g2, int b2)
{
int i;
double ratio;
for(i=0;i<width;i++)
{
ratio = (double)i/width;
setpen(r1+ratio*(r2-r1), g1+ratio*(g2-g1), b1+ratio*(b2-b1), 0, 1);
moveto(i, 0);
lineto(i, height);
}
}
Users browsing this forum: No registered users and 1 guest