-}
-
-static boolean XImage_to_Pixmap(Display *display, Window parent,
- XImageInfo *ximageinfo)
-{
- XGCValues gcv;
-
- ximageinfo->pixmap =
- XCreatePixmap(display, parent,
- ximageinfo->ximage->width,
- ximageinfo->ximage->height,
- ximageinfo->depth);
-
- ximageinfo->pixmap_mask =
- XCreatePixmap(display, parent,
- ximageinfo->ximage->width,
- ximageinfo->ximage->height,
- 1);
-
- /* build and cache the GC */
-
- if (!ximageinfo->gc)
- {
- gcv.function = GXcopy;
- ximageinfo->gc =
- XCreateGC(ximageinfo->display, ximageinfo->pixmap,
- GCFunction, &gcv);
- }
-
- if (!ximageinfo->gc_mask)
- {
- gcv.function = GXcopy;
- gcv.foreground = ximageinfo->foreground;
- gcv.background = ximageinfo->background;
- ximageinfo->gc_mask =
- XCreateGC(ximageinfo->display, ximageinfo->pixmap_mask,
- GCFunction | GCForeground | GCBackground, &gcv);
- }