Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!uunet!pcrat!rick From: rick@pcrat.uucp (Rick Richardson) Newsgroups: comp.windows.x Subject: XDrawString on a Bitmap Message-ID: <1990Aug13.135529.4563@pcrat.uucp> Date: 13 Aug 90 13:55:29 GMT Organization: PC Research, Inc. Lines: 32 Experts: I'm trying to write some text onto a bitmap: uchar image[HT][WID]; Pixmap bm; bm = XCreateBitmapFromData(TheDisplay, XtWindow(PageBox), image, WID*8, HT); XDrawString(TheDisplay, bm, DefaltGC, 10, 10, "SomeText", 8); But I get the following runtime error: X Protocol error: BadMatch, invalid parameter attributes Major opcode of failed request: 74 (X_PolyText8) Minor opcode of failed request: 0 Resource id in failed request: 0x40001a Serial number of failed request: 55 Current serial number in output stream: 56 What's going on? (This is on X11R3). BTW, I tried using XCreatePixmapFromBitmapData, and that worked when depth was set to 4, but failed when depth was set to 1. I wouldn't normally argue with success, but the speed difference between displaying an XCreateBitmap... vs. XCreatePixmap...(depth=4) is considerable, and I only need Black and White. -Rick -- Rick Richardson - PC Research, Inc., uunet!pcrat!rick, (201) 389-8963