Xref: utzoo comp.windows.x:25380 comp.sys.ibm.pc.rt:1790 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!decwrl!ucbvax!huji.ac.il!misha From: misha@huji.ac.il (Michael Pak) Newsgroups: comp.windows.x,comp.sys.ibm.pc.rt Subject: Xlib/GC question Summary: Different/Unexpected behaviour Message-ID: Date: 6 Aug 90 14:50:17 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: misha@boojum.huji.ac.il Followup-To: comp.windows.x Lines: 41 Hi there. Suppose I "XCreateSimpleWindow" (on a monochrome display) with foreground color set to WhitePixel(display,screen) and background color set to BlackPixel(display,screen). I then create the following GC: (exerpt from real code:) -------------- XGCValues gcval; unsigned long valmask; valmask=(GCForeground GCBackground GCTileStipXOrigin GCTileStipYOrigin GCFillStyle GCTile); gcval.foreground = BlackPixel(display,screen); gcval.background = WhitePixel(display,screen); gcval.tile=bit_bitmap; gcval.ts_x_origin=0; gcval.ts_y_origin=0; gcval.fill_style=FillTiled; *fill_gc=XCreateGC(display,window,valmask,&gcval); ----------------- The question is: If I perform XFillRectangle(display,window,fill_gc,x,y,width,height), what should I get? I mean, can it be that on different servers I'll get different results? I ask it, because when I run it on our IBM RT, (ACIS 4.3, X11R4), I get the foreground in white and the background in black, and on any other server (all release 4), I get the opposite. I stumbled across this strange behaviour, because there are some programs which behave in one way on IBM RT, and another on any other server. Thanks a lot. ****************************************** * Michael Pak * * Department of Computer Science, * * Hebrew University of Jerusalem, Israel * * E-Mail: misha@boojum.huji.ac.il * ******************************************