From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103734,5bda726c3605190d X-Google-Attributes: gid103734,public X-Google-Thread: 1164f8,31f50130d9fa6ebf,start X-Google-Attributes: gid1164f8,public X-Google-Thread: 10b612,31f50130d9fa6ebf,start X-Google-Attributes: gid10b612,public X-Google-ArrivalTime: 1989-04-14 14:58:13 PST Xref: utzoo comp.windows.x:9306 comp.unix.ultrix:816 comp.sys.dec:1175 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!epb2.lbl.gov!envbvs From: envbvs@epb2.lbl.gov (Brian V. Smith) Newsgroups: comp.windows.x,comp.unix.ultrix,comp.sys.dec Subject: stippling on color vs2000 Message-ID: <2411@helios.ee.lbl.gov> Date: 14 Apr 89 21:58:13 GMT References: <473@zgdvda.UUCP> Sender: usenet@helios.ee.lbl.gov I am trying use a stipple on a window in X11R3. On our monochrome vs2000 this works fine. But on our 4-plane color vs2000 the color that is used (and the pattern) is seemingly random! Here is the section of code that creates the gc: init_fill_gc() { XGCValues gcv; int i; gcv.fill_style = FillStippled; for (i=0; ifid; gcv.join_style = JoinMiter; gcmask = GCJoinStyle|GCFunction|GCForeground|GCBackground|GCFont; switch (op) { case PAINT: gcv.foreground = fg; gcv.background = bg; gcv.function = GXcopy; break; case ERASE: gcv.foreground = bg; gcv.background = bg; gcv.function = GXcopy; break; case INV_PAINT: gcv.foreground = fg ^ bg; gcv.background = bg; gcv.function = GXxor; break; case MERGE: gcv.foreground = fg; gcv.background = bg; gcv.function = GXor; break; } ngc = XCreateGC(tool_d, XtWindow(canvas_sw), gcmask, &gcv); XCopyGC(tool_d, gc, ~(gcmask), ngc); /* add main gc's values not specified here to the new one */ return (ngc); } Here is the code that does the fill: gc = fill_gc[i]; /* where i is the fill pattern index */ XFillPolygon(tool_d,canvas_pixwin,gc,points, npts, Complex, CoordModeOrigin); Again, this works in monochrome, but not in color. Note that I have explicitely set the color for foreground (and background) in the gc, but the colors on the screen are random. I have checked the actual values in the gc with dbx and they are ok. Is this a bug in the server implementation for the color vs2000? _____________________________________ Brian V. Smith (bvsmith@lbl.gov) Lawrence Berkeley Laboratory We don't need no stinking signatures!