Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!sunset.cis.ufl.edu!kml From: kml@sunset.cis.ufl.edu (Kevin Lahey) Newsgroups: comp.windows.x Subject: XPutImage monochrome image to color screen Summary: Why does it do strange things? Message-ID: <20170@uflorida.cis.ufl.EDU> Date: 25 Apr 89 17:27:10 GMT Sender: news@uflorida.cis.ufl.EDU Reply-To: kml@mosquito.cis.ufl.edu (Kevin Lahey) Organization: UF Center for Computer Vision Research Lines: 31 XPutImage appears to do some strange things when attempting to display monochrome images of the XYBitmap format on a display of depth greater than one. I'm running X11R3 with the Purdue speedups on various Sun3s running SunOS 4.0. I'm using twm, and trying to use the Athena widgets and the toolkit. I create a core widget inside a viewport widget. I set up to get Expose events. When I increase the size of the window or scroll it using the scroll bars, I get the expose event, which is the correct size, and I call XPutImage with the x, y, width and height values from the event. The image gets updated correctly, then a vertical white band is drawn on the image, generally near the edges of the image which have just been re-drawn. This only happens on the color screens; the program works perfectly on screens of depth one. It also works fine when I am refreshing the entire image; for instance, if I iconify the window, then de-iconify it, the image looks fine. It only screws up when it is trying to update only a part of the image. I have a work-around -- namely, I create a pixmap, XPutImage to the pixmap, and then do an XCopyPlane to the window. However, this doesn't strike me as elegant or clever; I should like to be able to use XPutImage to write to either color or monochrome screens. Thanks, Kevin -- Kevin Lahey UUCP: ...gatech!uflorida!beach.cis.ufl.edu!kml University of Florida, CIS Internet: kml@beach.cis.ufl.edu Whenever you find that you are on the side of the majority, it is time to reform. -- Mark Twain