Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!mailrus!husc6!frooz!cfa250!mvh
From: mvh@cfa250.harvard.edu (Mike Van Hilst)
Newsgroups: comp.windows.x
Subject: Re: Help with bug
Keywords: bitmap
Message-ID: <1699@cfa241.cfa250.harvard.edu>
Date: 15 Aug 89 22:58:08 GMT
Distribution: na
Organization: Harvard/Smithsonian Center for Astrophysics
Lines: 22

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