From: Derek Foreman Date: Sun, 18 May 2003 23:15:37 +0000 (+0000) Subject: is that a rectangle grad? damned if I know X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=e328dc2f60764154c37ab31c89fa956d719de10e;p=chaz%2Fopenbox is that a rectangle grad? damned if I know --- diff --git a/render/gradient.c b/render/gradient.c index 97c62dab..4b89434f 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 (x < y) val = (int)(drx * x); + if (drx * x < dry * y) val = (int)(drx * x); else val = (int)(dry * y); r = sf->data.planar.primary->r + val;