Newsgroups: comp.windows.x Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse) Subject: Re: A wish for R5 Message-ID: <9105090623.AA02805@lightning.McRCIM.McGill.EDU> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Date: 9 May 91 06:23:19 GMT Lines: 42 > [I]t would be very helpful ([...]) to have another X call for putting > bitmaps. Quoting from the man page for XDrawString, > "the drawable is only modified where the font character > has a bit set to 1." > What I am suggesting would be an XDrawBitmap() call to provide the > same functionality for drawing bitmaps. You can get this effect by setting the bitmap as the clip-mask in a GC and doing a FillRectangle operation. You can get a similar effect (with, unfortunately, more potential for visual anomalies) by doing two CopyPlane operations with appropriate values in the GCs: #1: foreground=0, background=~0, function=GXand #2: foreground=desired fg, background=0, function=GXor However, this second way may be faster, because many servers' implementation of clip-masks is grossly inefficient when the clip-mask does not decompose neatly into rectangles (and most font glyphs don't). If your pixel values satisfy one of the relationships (fg & bg) == bg (fg & bg) == fg then you can get away with using just one CopyPlane operation. (This seems like a special case, but I would guess, and it is a guess, that it's common enough to be worth checking for. Certainly every 1-bit display qualifies.) > Or, allowing clients to download fonts would also suffice for this > purpose. I got the impression from Jim Getty's talk at the X conference last January that R5 will contain much-improved font mechanisms that are capable of addressing this desire. I certainly hope so. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu