home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14595 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  33 lines

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