Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!ti-csl.csc.ti.COM!ekberg From: ekberg@ti-csl.csc.ti.COM Newsgroups: comp.windows.x Subject: Bitmap -> Pixmap operation > I have a Bitmap (single plane Pixmap) and an eight plane Pixmap. > I want to stamp the Bitmap onto the Pixmap so that any off locations in > the Bitmap don't change the Pixmap and any on locations in the Bitmap > set that Message-ID: <9008061555.AA23896@osage.csc.ti.com> Date: 6 Aug 90 15:55:44 GMT References: <24310@boulder.Colorado.EDU> Sender: ekberg@osage.csc.ti.com Organization: The Internet Lines: 9 An easy way to do this is to use the clip mask in the GC. Just specify your bitmap as the clip mask and perform the drawing operation you want. A 0 in the clip mask causes the corresponding pixel in the pixmap to not be modified. If you set the GC's foreground color to your specific value, and do the drawing operation for the object you want (rectangle, line, etc.) the 1 pixels in the clip mask will cause the corresponding pixels (if they are part of the object being drawn) in the pixmap to be set to the foreground pixel. -- tom (aisle C-4Q), ekberg@csc.ti.com