Xref: utzoo comp.windows.x:35134 comp.windows.open-look:1180 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!infonode!doyle From: doyle@ingr.com (Doyle C. Davidson) Newsgroups: comp.windows.x,comp.windows.open-look Subject: Re: Clip Mask problem Message-ID: <1991Apr10.214452.14674@infonode.ingr.com> Date: 10 Apr 91 21:44:52 GMT References: <6026@trantor.harris-atd.com> Sender: doyle@infonode.ingr.com (Doyle Davidson) Reply-To: ingr!doyle Organization: Intergraph Corporation - Third Party Software Lines: 32 In article <6026@trantor.harris-atd.com>, chuck@trantor.harris-atd.com (Chuck Musciano) writes: > > Within XView, I have created a canvas, and I wish to render a number of >small pixmaps in the canvas using clip masks. I am also rendering some text >next to each pixmap. The net result is a file manager-like array of glyphs >and names in a scrolling window. I use clip masks to preserve the background >color when drawing non-rectangular glyphs. > My method of drawing non-opaque pixmaps is: Create a bitmap with a bit set wherever there is a pixel set in the pixmap Fill the area non-opaquely with the bitmap pattern (don't forget pattern offsets) with foreground set to 0. (XCopyPlane) GXor in the pixmap (this requires that non-drawn pixel values of the pixmap be 0) with XCopyArea and Function = GXor. This avoids any clip masks in the server, which as a former server implementer, can be very abusive of the server. Just my $0.02 Doyle ------------------------------------------------------------------ Doyle C. Davidson | Intergraph Corp. | These comments are... Everywhere You Look!! | Third Party Software | Product Development | (205) 730-2000 | | X-clusively my own. ..doyle@ingr.com -or- | ..!uunet!ingr!doyle | ------------------------------------------------------------------