- linelen = ((image->width + 7) / 8);
- data_mask = checked_malloc(linelen * image->height);
-
- memcpy((char *)data_mask, (char *)image->data_mask,
- linelen * image->height);
-
- gcv.function = GXcopy;
- ximageinfo->ximage_mask =
- XCreateImage(display, visual, 1, XYBitmap, 0, (char *)data_mask,
- image->width, image->height, 8, linelen);
-
-#if 1
- if (visual->class == DirectColor || visual->class == TrueColor)
- {
- Pixel pixval;
- dbits = bitsPerPixelAtDepth(display, screen, ddepth);
- dpixlen = (dbits + 7) / 8;
- pixval =
- redvalue[65535 >> 8] |
- greenvalue[65535 >> 8] |
- bluevalue[65535 >> 8];
- ximageinfo->background = pixval;
- pixval =
- redvalue[0 >> 8] |
- greenvalue[0 >> 8] |
- bluevalue[0 >> 8];
- ximageinfo->foreground = pixval;
- }
- else /* Not Direct or True Color */
- {
- ximageinfo->foreground = BlackPixel(display, screen);
- ximageinfo->background = WhitePixel(display, screen);
+ default:
+ Error(ERR_RETURN, "display class not supported");
+ Error(ERR_EXIT, "DirectColor, TrueColor or PseudoColor display needed");
+ break;