#include #include #include #include #include int main (int argc, char **argv) { Display *dpy; Window rootWin, w; GC gc; XGCValues gcv; Pixmap pixmap; XPoint p[50]; dpy = XOpenDisplay(NULL); rootWin = DefaultRootWindow(dpy); pixmap = XCreatePixmap(dpy, rootWin, 176, 17, DefaultDepthOfScreen(DefaultScreenOfDisplay(dpy))); gcv.foreground = BlackPixelOfScreen(DefaultScreenOfDisplay(dpy)); gcv.background = WhitePixelOfScreen(DefaultScreenOfDisplay(dpy)); gc = XCreateGC(dpy, pixmap, GCForeground|GCBackground, &gcv); XFillRectangle(dpy, pixmap, gc, 0, 0, 176, 17); XSetForeground(dpy, gc, 0x0000ff); p[0].x = -2; p[0].y = 14; p[1].x = 0; p[1].y = 16; p[2].x = 2; p[2].y = 14; XDrawLines(dpy, pixmap, gc, p, 3, CoordModeOrigin); XFlush(dpy); XSync(dpy, 1); return(0); }