[comp.windows.x] Help with bug

jacobi.pa@XEROX.COM (08/12/89)

Is this a known bug?
I believe this bug is in the X server, but how do I prove it... 

I'm using a PutImage protocol request with format=bitmap aimed at a window
on the color screen (8 bit per pixel) of a Sun Sparcstation. (X11R3 (MIT);
SunOs 4.0.3)

Executing the request partly works: Bits are painted first, but then the
rightmost part (looks like left_pad pixels) of the image is restored again
to something which looks like the previous contents but blurred a little.  
It also looks a little funny that the window is painted in two steps.

I know I have not given a reasonable test case.  Excuse me, I'm not a C
programmer; my Cedar test case might not help you anyway. 

Christian Jacobi
Xerox PARC

mvh@cfa250.harvard.edu (Mike Van Hilst) (08/16/89)

Since no one else responded to jacobi.pa@XEROX.COM, here are my two
bits:
> I'm using a PutImage protocol request with format=bitmap ... on
> a color screen (8 bit per pixel) of a Sun Sparcstation. ...
> ... Bits are painted first, but then the rightmost part (looks
> like left_pad pixels) of the image is restored again to something
> which looks like the previous contents but blurred a little.

I can only guess at this problem:
On Sparcstations (and MIPS machines) there are no real char
operations.  If you are using chars (or shorts) to construct your
bitmaps, be aware of the other bytes, especially for shift and
complement (<<, >>, ~) operations.  Use "|= 0xFF" in place of "~".

> It also looks a little funny that the window is painted in two steps.

The foreground and background are both colors.  It is not as simple as
setting the foreground bits and not the background ones. The foreground
must be painted one color, and the background another (as per the GC).

	Mike VanHilst
	Smithsonian Astorphysical Observatory