- 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_offset)
- + (sp->primary->g << default_green_offset)
- + (sp->primary->b << default_blue_offset);
-
- 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);
-
- if (l->surface.data.planar.interlaced) {
- if (sp->secondary->gc == None)
- color_allocate_gc(sp->secondary);
- for (i = y; i < h; i += 2)
- XDrawLine(ob_display, l->pixmap, sp->secondary->gc,
- x, i, w, i);
- }
-/*
- switch (texture.relief()) {
- case RenderTexture::Raised:
- switch (texture.bevel()) {
- case RenderTexture::Bevel1:
- XDrawLine(ob_display, l->pixmap, texture.bevelDarkColor().gc(),
- left, bottom, right, bottom);
- XDrawLine(ob_display, l->pixmap, texture.bevelDarkColor().gc(),
- right, bottom, right, top);
-
- XDrawLine(ob_display, l->pixmap, texture.bevelLightColor().gc(),
- left, top, right, top);
- XDrawLine(ob_display, l->pixmap, texture.bevelLightColor().gc(),
- left, bottom, left, top);
- break;
- case RenderTexture::Bevel2:
- XDrawLine(ob_display, l->pixmap, texture.bevelDarkColor().gc(),
- left + 1, bottom - 2, right - 2, bottom - 2);
- XDrawLine(ob_display, l->pixmap, texture.bevelDarkColor().gc(),
- right - 2, bottom - 2, right - 2, top + 1);
-
- XDrawLine(ob_display, l->pixmap, texture.bevelLightColor().gc(),
- left + 1, top + 1, right - 2, top + 1);
- XDrawLine(**display, sf.pixmap(), texture.bevelLightColor().gc(),
- left + 1, bottom - 2, left + 1, top + 1);
- break;
- default:
- assert(false); // unhandled RenderTexture::BevelType
+ pixel32 pix;
+ int i, a, b;
+ Surface *sp = &l->surface;
+ int left = x, top = y, right = x + w - 1, bottom = y + h - 1;
+
+ if (sp->primary->gc == None)
+ color_allocate_gc(sp->primary);
+ pix = (sp->primary->r << default_red_offset)
+ + (sp->primary->g << default_green_offset)
+ + (sp->primary->b << default_blue_offset);
+
+ for (a = 0; a < w; a++)
+ for (b = 0; b < h; b++)
+ sp->pixel_data[a + b * w] = pix;
+
+ XFillRectangle(ob_display, l->pixmap, sp->primary->gc,
+ x, y, w, h);
+
+ if (sp->interlaced) {
+ if (sp->secondary->gc == None)
+ color_allocate_gc(sp->secondary);
+ for (i = y; i < h; i += 2)
+ XDrawLine(ob_display, l->pixmap, sp->secondary->gc,
+ x, i, w, i);