home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / windows / x / 14207 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.6 KB

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!thunder.mcrcim.mcgill.edu!mouse
  2. From: mouse@thunder.mcrcim.mcgill.edu
  3. Newsgroups: comp.windows.x
  4. Date: 17 Jul 92 19:08 MDT
  5. Subject: Re: Non-rectangular bitmaps/setting
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <1992Jul17.150805.29608@thunder.m>
  8. Nf-ID: #N:1992Jul17.150805.29608@thunder.m:-130841752:001:1193
  9. Nf-From: thunder.mcrcim.mcgill.edu!mouse    Jul 17 19:08:00 1992
  10. Lines: 32
  11.  
  12.  
  13. In article <1992Jul13.194934.5605@news.cs.brandeis.edu>, slanka@chaos.cs.brandeis.edu (Ishantha Lokuge) writes:
  14.  
  15. > I am trying to create a non-rectangular bitmap...
  16.  
  17. This is not possible.  You'll have to get the effect you want some
  18. other way.
  19.  
  20. > I wish to display this using XCopyPlane.  How can one set the
  21. > background of a pixmap so that in effect it is transparent.
  22.  
  23. Pixmaps don't have backgrounds.
  24.  
  25. > This means that the pixmap will appear to be irregular (or just the
  26. > shape of the foreground)....
  27.  
  28. You will have to go about your ends some other way.  There are various
  29. possibilities.  One is to create a bitmap that is 1 where you want to
  30. change things when copying and 0 when not, then set this as the
  31. clip-mask in your GC, and then do an XFillRectangle (if the drawings
  32. are all one color) or an XCopyArea/XCopyPlane (if you want the opaque
  33. area to include more than one color).  In the former case, you can also
  34. set the bitmap as the stipple in the GC and set the fill-style to
  35. FillStippled.
  36.  
  37. If the shape decomposes easily into relatively few rectangles, you can
  38. also take advantage of that and draw each rectangle separately.
  39.  
  40.                     der Mouse
  41.  
  42.                 mouse@larry.mcrcim.mcgill.edu
  43.  
  44.