Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: Nagesh_Pabbisetty.Henr801C@xerox.COM Newsgroups: comp.windows.x Subject: Re: white and black colors in the X server Message-ID: <".5-Jun-91.14:22:03.EDT".*.Nagesh_Pabbisetty.Henr801C@Xerox.com> Date: 5 Jun 91 18:22:03 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 56 Bob & keith, Thanks for responding to my query. Sorry for taking so much of your time, but I am a little confused about what you said in your message: On the Sun, 0 is white and 1 is black (set in sunBW2.c). But you mentioned the following in your message: "White" in the mfb code simply means "1" not white, "Black" simply means "0" not black. Does the "ddx/sun" portion of the server have a different notion of white and black than the "ddx/mfb" portion of the server? Doesn't seem probable! In your message, you said: "Don't just read the function names, read and understand the code". I am unable to find the segment of code which makes mfbTEGlyphBltWhite paint 1's if white is defined as 1 in sunBW2.c, and makes it paint 0's if white is so defined there... Any help you can provide will be appreciated. Also, on the Sun, mfb.h defines the following #define RROP_BLACK GXclear #define RROP_WHITE GXset #define fnCLEAR(src, dst) (0) #define fnSET(src, dst) (~0) Doesn't GXclear/fnCLEAR means setting to 0? If it does, then how can RROP_BLACK be synonymous with GXclear on a Sun? mfbPaintWindow procedure in mfbpntwin.c has the following segment of code: case BackgroundPixel: if (pWin->background.pixel) mfbSolidWhiteArea(pWin, REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), GXset, NullPixmap); else mfbSolidBlackArea(pWin, REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), GXclear, NullPixmap); return; On the Sun, if 1 is Black, and 0 is white, then how come WhiteArea is called when the background pixel is not equal to 0... Overall Question: Where, if any, is the magic segment of code which communicates the values of black and white from sunBW2.c to the mfb routines so that the correct drawing effect with 0's and 1's is achieved (irrespective of the name of the functions) Thanks... Nagesh Pabbisetty