From: Dana Jansens Date: Tue, 24 Jun 2003 18:56:47 +0000 (+0000) Subject: do horz grads without any multipliaction X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=5cd0ed57acda1e7858be5c9d20635f5660353a2b;p=chaz%2Fopenbox do horz grads without any multipliaction --- diff --git a/render/gradient.c b/render/gradient.c index 6f976e0b..a819a4be 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -334,7 +334,7 @@ static void gradient_solid(RrAppearance *l, int w, int h) static void gradient_horizontal(RrSurface *sf, int w, int h) { int x, y; - RrPixel32 *data = sf->RrPixel_data; + RrPixel32 *data = sf->RrPixel_data, *datav; RrPixel32 current; VARS(x); @@ -342,8 +342,11 @@ static void gradient_horizontal(RrSurface *sf, int w, int h) for (x = w - 1; x > 0; --x) { /* 0 -> w-1 */ current = COLOR(x); - for (y = h - 1; y >= 0; --y) /* 0 -> h */ - *(data + y * w) = current; + datav = data; + for (y = h - 1; y >= 0; --y) { /* 0 -> h */ + *datav = current; + datav += w; + } ++data; NEXT(x);