summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-05 10:51:19 +0000
committerDana Jansens <danakj@orodu.net>2003-08-05 10:51:19 +0000
commit08f1f213f101d092dc712297709d855d77fab93f (patch)
tree7e6348f863f2bbf1388c6faa5dd0ec4ac9250146 /render
parent2494762dbf89e0ea8eb72c460c6f7281fa0a2204 (diff)
split the increment into a separate macro
Diffstat (limited to 'render')
-rw-r--r--render/gradient.c7
1 files changed, 5 insertions, 2 deletions
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]; \