break;
default:
g_message("unhandled gradient");
+ return;
}
if (sf->data.planar.relief == Flat && sf->data.planar.border) {
void gradient_solid(Appearance *l, int x, int y, int w, int h)
{
- int i;
+ pixel32 pix;
+ int i, a, b;
PlanarSurface *sp = &l->surface.data.planar;
int left = x, top = y, right = w - 1, bottom = h - 1;
if (sp->primary->gc == None)
color_allocate_gc(sp->primary);
+ pix = (sp->primary->r << default_red_shift)
+ + (sp->primary->g << default_green_shift)
+ + (sp->primary->b << default_blue_shift);
+
+ for (a = 0; a < l->area.width; a++)
+ for (b = 0; b < l->area.height; b++)
+ sp->pixel_data[a + b*l->area.width] = pix;
+
XFillRectangle(ob_display, l->pixmap, sp->primary->gc
, x, y, w, h);