home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu
- Newsgroups: comp.windows.x
- Date: 17 Jul 92 19:08 MDT
- Subject: Re: Non-rectangular bitmaps/setting
- Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
- Message-ID: <1992Jul17.150805.29608@thunder.m>
- Nf-ID: #N:1992Jul17.150805.29608@thunder.m:-130841752:001:1193
- Nf-From: thunder.mcrcim.mcgill.edu!mouse Jul 17 19:08:00 1992
- Lines: 32
-
-
- In article <1992Jul13.194934.5605@news.cs.brandeis.edu>, slanka@chaos.cs.brandeis.edu (Ishantha Lokuge) writes:
-
- > I am trying to create a non-rectangular bitmap...
-
- This is not possible. You'll have to get the effect you want some
- other way.
-
- > I wish to display this using XCopyPlane. How can one set the
- > background of a pixmap so that in effect it is transparent.
-
- Pixmaps don't have backgrounds.
-
- > This means that the pixmap will appear to be irregular (or just the
- > shape of the foreground)....
-
- You will have to go about your ends some other way. There are various
- possibilities. One is to create a bitmap that is 1 where you want to
- change things when copying and 0 when not, then set this as the
- clip-mask in your GC, and then do an XFillRectangle (if the drawings
- are all one color) or an XCopyArea/XCopyPlane (if you want the opaque
- area to include more than one color). In the former case, you can also
- set the bitmap as the stipple in the GC and set the fill-style to
- FillStippled.
-
- If the shape decomposes easily into relatively few rectangles, you can
- also take advantage of that and draw each rectangle separately.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-
-