Xref: utzoo comp.windows.x:36432 comp.graphics:18020 misc.wanted:15157 Newsgroups: comp.windows.x,comp.graphics,comp.source.wanted,comp.source.x,misc.wanted Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!flea.engin.umich.edu!gilgalad From: gilgalad@caen.engin.umich.edu (Ralph Seguin) Subject: NEEDED: Color "OR" operation Distribution: na Organization: University of Michigan Engineering, Ann Arbor Message-ID: <1991May15.052219.26586@engin.umich.edu> Date: Wed, 15 May 91 05:22:19 GMT Hi. I need the ability to specify a color dominance in graphics operations in X. More or less a graphics "OR" routine. I need an efficient means of doing this with XPutImage (I DO NOT want to copy back the pixmap section and do the "OR" locally since that would involve multiple transfers, very inefficient). The situation is this: I have a bitmap (1 plane pixmap) locally, and I wish to place it onto a server (color or bw) and I want to be able to specify this behavior: source dest result ------ ---- ------ fg fg fg fg bg fg bg fg fg bg bg bg bg represents the background (or actually, any) color (index) fg represents the foreground (or color to dominate) color (index) As you can see, whenever either pixel is the foreground (or specified dominant color), the result will be a foreground, ... More or less an "OR" operation. Is there some efficient means of implementing this? Is there a way of mapping all pixels of a certain color within a region to be another color (on the server)? Is there a friendly way of allocating a color to be at indices 0 and 1 without screwing up the global color map? Will R5 take care of this :) ? Thanks, Ralph Ralph Seguin rps@arbortext.com 536 South Forest Apt. #915 gilgalad@zip.eecs.umich.edu Ann Arbor, MI 48104 (313) 662-4805