Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!xpiinc.UUCP!ctr From: ctr@xpiinc.UUCP Newsgroups: comp.windows.x Subject: Beware the non-portable GX functions... Message-ID: <8903152321.AA00859@bird.xpiinc.uu.net> Date: 15 Mar 89 23:21:22 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 27 In a recent message, Peter Galvin notes that on a particular server, the GXset and GXclear, "do the reverse of what they should do". In reality, Peter, it is your expectations that are incorrect. Since I have seen this problem in a number of applications, I'd like to remind X application writers that: ---------------------------------------------------------- |GXset and GXclear will NOT yield consistent results across| | all X server displays!!! | ---------------------------------------------------------- They put the values 1 and 0, respectively, onto the screen. Most displays interpret 1 as Black and 0 as White, which is what people seem to expect. This is why "the sun works correctly". Other displays, like the Visual 640 (and, evidently, IBM's apa16) represent Black as 0, with the result that GXset and GXclear do the reverse of what people expect. Hence, the use of these functions in applications which expect widespread use is as bad as setting the foreground and background pixel values to a hardcoded 1 or 0, rather than using the BlackPixel() and WhitePixel() macros. Please don't do it!!! -------------------------------------- Christian Reimer Visual Technology (XPI Division) ctr@xpiinc.uu.net | uunet!xpiinc!ctr