home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!noc.near.net!gateway!pictel!oj
- From: oj@pictel.com (Oliver Jones)
- Subject: Re: How can I display a cursor glyph as a bitmap?
- Message-ID: <1992Jul24.171954.8075@pictel.com>
- Organization: PictureTel Corporation
- References: <Brv1tr.3pw@news.cso.uiuc.edu>
- Date: Fri, 24 Jul 1992 17:19:54 GMT
- Lines: 15
-
- In article <Brv1tr.3pw@news.cso.uiuc.edu> hofmann@cs.uiuc.edu (J. Scott Hofmann) writes:
- >Is there any
- >way, given a cursor index (ie XC_target, XC_dot) I can display the glyph just as
- >a bitmap?
-
-
- Font cursorfont = XLoadFont (dpy, "cursor");
- GC cursorgc = XCreateGC (dpy,win, 0,0);
- XSetFont (dpy, cursorgc, cursorfont);
- char cursorglyph = XC_dot;
-
- XDrawString (dpy, win, cursorgc, x,y, &cursorglyph, 1L);
-
- There's a font named "cursor" full of these glyphs. The even-numbered ones
- (#defined as XC_dot and so forth) are the glyphs, and the odd are the masks.
-