 Re: Drawing Lines 
In-Reply-To: 's message of Wed, 21 Apr 93 11:19:19 GMT
Organization: Open Software Foundation
Lines: 47

In article <>   writes:

   In article <>,   writes:

     :
     :

   |>    XSetFunction;
   |>    XSetForeground;
   |> 
   |> Then to draw I do:
   |> 
   |>    XDrawLine( myDisplay, XtWindow, gc, x1, y1, x2, y2);
   |>    XFlush;
   |> 
   |> And when I'm all done, to return things to normal I do:
   |> 
   |>    XSetFunction;
   |> 
   |> 
   |> What I'd like to happen is for the lines I draw to be the inverse of
   |> whatever I'm drawing over.  Instead what happens is I get white lines.  If
   |> the lines are over a white background - nothing shows up.  If the lines are
   |> over a black area - nothing shows up!  It's very strange.  But the GXxor
   |> function seems right - since if I do a rubber-banding box, it erases and
   |> redraws itself correctly .
   |> 
   |> Any suggestions what I'm doing wrong?
   |> 
   |> david


      Try change the GXxor to GXequiv.  I have to do this for programs that
      are to run on NCD terminals ...

There is a small section in the O'Reilly Xlib books that describes
the right thing to do.  The key is to set the plane_mask in the
GC to the OR of the foreground and background pixel values.



--
Douglas S. Rand <>		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.
Amateur Radio: KC1KJ
