Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!bcm!wilkins.iaims.bcm.tmc.edu!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Pixmap conversion Message-ID: <2459@gazette.bcm.tmc.edu> Date: 26 Oct 90 15:57:07 GMT References: <9010260843.AA05138@hal.nta.no> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Lines: 23 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu Your X server should never barf on a Pixmap of depth 1. You need to include more information and a code sample. How are you using the Pixmap? Are you using XCopyArea? Are you using XCopyPlanes? Are you just using a widget? But in answer to your question use XCreatePixmapFromBitmapData. It should return you a multi-plane pixmap using bitmap data. Here is the general rule : Using XCopyArea, the depths have to match. Using XCopyPlane, the source should probably be depth 1. XCopyPlane uses the foreground and background as replacements for 1 and 0 respectively. The Athena label widget uses XCopyPlane for 1-bit pixmaps, and XCopyArea for multi-plane pixmaps (a small hack, but works most of the time). -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776