-static void gradient_pyramid(RrSurface *sf, int inw, int inh)
-{
- int x, y, w = (inw >> 1) + 1, h = (inh >> 1) + 1;
- RrPixel32 *data = sf->RrPixel_data;
- RrPixel32 *end = data + inw*inh - 1;
- RrPixel32 current;
- RrColor left, right;
- RrColor extracorner;
-
- VARS(lefty);
- VARS(righty);
- VARS(x);
-
- extracorner.r = (sf->primary->r + sf->secondary->r) / 2;
- extracorner.g = (sf->primary->g + sf->secondary->g) / 2;
- extracorner.b = (sf->primary->b + sf->secondary->b) / 2;
-
- SETUP(lefty, (&extracorner), sf->secondary, h);
- SETUP(righty, sf->primary, (&extracorner), h);
-
- for (y = h - 1; y > 0; --y) { /* 0 -> h-1 */
- COLOR_RR(lefty, (&left));
- COLOR_RR(righty, (&right));
-
- SETUP(x, (&left), (&right), w);
-
- for (x = w - 1; x > 0; --x) { /* 0 -> w-1 */
- current = COLOR(x);
- *(data+x) = current;
- *(data+inw-x) = current;
- *(end-x) = current;
- *(end-(inw-x)) = current;
-
- NEXT(x);
- }
- current = COLOR(x);
- *(data+x) = current;
- *(data+inw-x) = current;
- *(end-x) = current;
- *(end-(inw-x)) = current;
-
- data+=inw;
- end-=inw;
-
- NEXT(lefty);
- NEXT(righty);
- }
- COLOR_RR(lefty, (&left));
- COLOR_RR(righty, (&right));
-
- SETUP(x, (&left), (&right), w);
-
- for (x = w - 1; x > 0; --x) { /* 0 -> w-1 */
- current = COLOR(x);
- *(data+x) = current;
- *(data+inw-x) = current;
- *(end-x) = current;
- *(end-(inw-x)) = current;
-
- NEXT(x);
- }
- *(data+x) = current;
- *(data+inw-x) = current;
- *(end-x) = current;
- *(end-(inw-x)) = current;
-}
-
-static void gradient_rectangle(RrSurface *sf, int inw, int inh)