+static void format_row(unsigned long *row, const XColor *c,
+ unsigned s, unsigned y, unsigned w, unsigned h)
+{
+ unsigned x;
+
+ for (x = 0; x < w; x++) {
+ row[x] = wm_pixel(&c[COLOUR_PRIMARY]);
+ if (x < s || y < s)
+ row[x] = wm_pixel(&c[COLOUR_LIGHT]);
+ if ((x+s >= w && x+y >= w) || (y+s >= h && x+y >= h))
+ row[x] = wm_pixel(&c[COLOUR_DARK]);
+ }
+}
+