From: Derek Foreman Date: Sun, 18 May 2003 23:27:31 +0000 (+0000) Subject: there's the rect grad. now stop bugging me :( X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b24e6fbfa17bd20b3ac977c006be891a88ed89ac;p=chaz%2Fopenbox there's the rect grad. now stop bugging me :( --- diff --git a/render/gradient.c b/render/gradient.c index 4b89434f..e669a2c4 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -397,7 +397,7 @@ void gradient_rectangle(Surface *sf, int inw, int inh) dby = dbx/(float)h; dbx/= (float)w; for (x = 0; x < w; ++x, data) { - if (drx * x < dry * y) val = (int)(drx * x); + if ((float)x/(float)w < (float)y/(float)h) val = (int)(drx * x); else val = (int)(dry * y); r = sf->data.planar.primary->r + val;