In-Reply-To: stephen@tangent1.UUCP's message of Fri, 8 Jan 1993 22:59:14 GMT
Message-ID: <DRAND.93Jan11125916@spinner.osf.org>
Sender: news@osf.org (USENET News System)
Organization: Open Software Foundation
References: <9301082259.AA16974@questercorp>
Date: 11 Jan 93 12:59:16
Lines: 20
In article <9301082259.AA16974@questercorp> stephen@tangent1.UUCP (Stephen McKay) writes:
I have created a DrawArea widget under motif and have colored the foreground of this region using Xcolor "DeepSkyBlue".
The problem comes when I want to select the foreground color to use with rubberbanding. ie. a rectangle. What is the method fo selecting a foreground (x) color that when used with Xor, displays the desired color (y)?
Note: If the DrawArea is XFillRectangle with "DeepSkyBlue" and I draw a line with logical function GXxor and foreground color = "White", the color of the line drawn is "DeepSkyBlue".
This is probably in the FAQ, you need to set plane_mask to the
OR of the two colors involved. A detailed description exists in
at least the O'Reilly books. The short explanation is that XOR
xors all the pixel bits and the result had better be a valid
pixel value.
--
Douglas S. Rand <drand@osf.org> OSF/Motif Dev.
Snail: 11 Cambridge Center, Cambridge, MA 02142
Disclaimer: I don't know if OSF agrees with me... let's vote on it.