re drawing lines inverse xor i m trying to write some code that lets me draw lines and do rubber band boxes in motif x i m running on an bit display for which i ve created a colormap and am using almost all of the colors i want to draw the lines in a drawing area widget a widget in which i m displaying a bitmap using xputimage if doesn t matter if the lines i draw interactively stay around when the window is refreshed currently to draw interactively i begin with drawindex is an colortable index i reserve for the foreground my default bg color is the color index for the background of my image palette colors drawindex red palette colors my default bg color red palette colors drawindex green palette colors my default bg color green palette colors drawindex blue palette colors my default bg color blue xstorecolors mydisplay my cmap palette colors drawindex xflush mydisplay xsetfunction mydisplay gc gxxor xsetforeground mydisplay gc drawindex then to draw i do xdrawline mydisplay xtwindow drawingarea gc x y x y xflush mydisplay and when i m all done to return things to normal i do xsetfunction mydisplay gc gxcopy 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 ie not disturbing the underlying image any suggestions what i m doing wrong i believe for this to work on a color display you must set the foreground of the gc to be foreground background patrick l mahan tgv window washer mahan tgv com waking a person unnecessarily should not be considered lazarus long a capital crime for a first offense that is from the notebooks of lazarus long
