Newsgroups: comp.windows.x
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!bloom-beacon!dont-send-mail-to-path-lines
From: rws@expo.lcs.mit.EDU (Bob Scheifler)
Subject: Re: white and black colors in the X server
Message-ID: <9106052000.AA25064@expire.lcs.mit.edu>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
References: <".5-Jun-91.14:22:03.EDT".*.Nagesh_Pabbisetty.Henr801C@Xerox.com>
Date: 5 Jun 91 20:00:49 GMT
Lines: 41

You seem so confused that I doubt I have enough free time to set you straight.
Perhaps you should have gone to Keith's server tutorial at Xhibition this week.

    Does the "ddx/sun" portion of the server have a different notion of white and
    black than the "ddx/mfb" portion of the server?

ddx/mfb doesn't have a notion of what pixel is RGB black and what pixel is
RGB white, ddx/sun does.

    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...

mfb doesn't have such code.  The client specifies pixel values for drawing
operations, usually on the basis of colormap entries.  The RGB values for
0 and 1 are held in the colormap for the screen.  The default mfb cmap code
decides which pixel to make RGB black and RGB white based on the blackPixel
and whitePixel entries of the screen, initialized by the ddx.

    Doesn't GXclear/fnCLEAR means setting to 0?

Yes.

    If it does, then how can RROP_BLACK be synonymous with GXclear on a Sun?

You obviously didn't understand the previous message segments you quoted back
at me.  I said that ""Black" simply means "0" not black.".  Substitute "0"
for BLACK in your question and the answer is "clear".

    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...

You still haven't understood what black and white mean in mfb code.

	Where, if any, is the magic segment of code which communicates
	the values of black and white from sunBW2.c to the mfb routines

In SunBW2Init:

    pScreen->whitePixel = 0;
    pScreen->blackPixel = 1;
