home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: How can I display a cursor glyph as a bitmap?
- Message-ID: <1992Jul29.235103.5067@thunder.mcrcim.mcgill.edu>
- Organization: McGill Research Centre for Intelligent Machines
- References: <Brv1tr.3pw@news.cso.uiuc.edu>
- Date: Wed, 29 Jul 92 23:51:03 GMT
- Lines: 23
-
- In article <Brv1tr.3pw@news.cso.uiuc.edu>, hofmann@cs.uiuc.edu (J. Scott Hofmann) writes:
-
- > I need to display a remote user's cursor glyph on my display. Is
- > there any way, given the index (ie XC_target, XC_dot) I can display
- > the glyph just as a bitmap?
-
- If you're certain the cursor is one of the standard font cursors (the
- ones created with XCreateFontCursor, with XC_ names), then you can just
- render the relevant character from the font called "cursor" into a
- bitmap and read it back with XGetImage. (The XC_ define is the index
- of the picture; add one to it to get the index of the mask. Both are
- simply glyphs in the font.)
-
- You *must* know how the cursor was created. There are at least three
- ways to create cursors, one of which allows the client to use arbitrary
- bitmaps. There is no way to discover what a cursor looks like after
- the fact; you must go back and work out what it should look like, given
- how it was created. (Standard font cursors make this easy.)
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-