X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=render%2Fgradient.c;h=55a2fd27238c3d07ddc25a0a1976e04bdc37b672;hb=888c3d1f6ae80c3e2d8ab37ebead8a96a8d0a565;hp=abbbc659ab42ad65f05a3ee1a9e3876201bef7c8;hpb=3a26c8aa8ec1441d28f9f771d4ce4a318ec05147;p=chaz%2Fopenbox diff --git a/render/gradient.c b/render/gradient.c index abbbc659..55a2fd27 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -304,6 +304,9 @@ static void gradient_solid(RrAppearance *l, int w, int h) (color##x[1] << RrDefaultGreenOffset) + \ (color##x[2] << RrDefaultBlueOffset)) +#define INCREMENT(x, i) \ + (inc##x[i]) + #define NEXT(x) \ { \ int i; \ @@ -314,13 +317,13 @@ static void gradient_solid(RrAppearance *l, int w, int h) /* Y (color) is dependant on X */ \ error##x[i] += cdelta##x[i]; \ if ((error##x[i] << 1) >= len##x) { \ - color##x[i] += inc##x[i]; \ + color##x[i] += INCREMENT(x, i); \ error##x[i] -= len##x; \ } \ } else { \ /* X is dependant on Y (color) */ \ while (1) { \ - color##x[i] += inc##x[i]; \ + color##x[i] += INCREMENT(x, i); \ error##x[i] += len##x; \ if ((error##x[i] << 1) >= cdelta##x[i]) { \ error##x[i] -= cdelta##x[i]; \