4
void Picture::load(const char *name, int index) {
5
static char *dir = strdup(
6
access(XBILL_HOME "pixmaps/logo.xpm", R_OK) ? "" : XBILL_HOME);
13
gcmask = GCForeground|GCBackground|GCGraphicsExposures;
14
gcval.graphics_exposures = False;
15
attr.valuemask= XpmCloseness | XpmReturnPixels | XpmColormap | XpmDepth;
16
attr.closeness = 65535;
17
attr.colormap = ui.colormap;
18
attr.depth = ui.depth;
20
sprintf (file, "%spixmaps/%s_%d.xpm", dir, name, index);
22
(file, "%spixmaps/%s.xpm", dir, name);
23
i = XpmReadFileToPixmap(ui.display, ui.rootwindow, file, &pix,
26
printf ("cannot open %s\n", file);
29
gc = XCreateGC (ui.display, ui.offscreen, gcmask, &gcval);
30
XSetClipMask(ui.display, gc, mask);