[comp.windows.x] XImage->Pixmap->Window

curtz@skat.usc.edu (Curtz Lam) (12/25/90)

        I am trying to display some images with XImage->Pixmap->Window,
by using XPutImage and XClearArea.  The problem is sometimes the old
image keeps appearing two or three times before the new one shows up.
I've tried putting an XFlush after XPutImage and before XClearArea but
it didn't help.  Any idea?

                                                        Curtz

p.s: It works fine when I use XImage->Window although I would prefer using
     a Pixmap.


-- 
Internet: curtz@usc.edu
UUCP: ...!uunet!usc!curtz

stuart_rose@canrem.uucp (stuart rose) (12/26/90)

curtz@skat.usc.edu (Curtz Lam) writes in article <29010@usc> ...

CL>        I am trying to display some images with XImage->Pixmap->Window,
CL>by using XPutImage and XClearArea.  The problem is sometimes the old
CL>image keeps appearing two or three times before the new one shows up.
CL>I've tried putting an XFlush after XPutImage and before XClearArea but
CL>it didn't help.  Any idea?

CL>                                                        Curtz

CL>p.s: It works fine when I use XImage->Window although I would prefer using
CL>     a Pixmap.

I believe you should be using XCopyArea to copy the pixmap to the
window.

In any case, if you can get away without the pixmap, do so. I find
that pixmaps use more of the server resources than I would like.
When running an X server on my PC (DEC's PCSA PC DECwindows),
programs with pixmaps eat up available RAM and eventually cause
disk swapping.


Take Care,                            | stuart.rose#canremote.uucp
Stuart                                | Mississauga, Ontario, Canada.
---
 ~ DeLuxe}ac #2428 ~ From Beatiful Downtown Mississuga
--
Canada Remote Systems.  Toronto, Ontario
NorthAmeriNet Host

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (12/29/90)

In article <29010@usc>, curtz@skat.usc.edu (Curtz Lam) writes:
|> 
|>         I am trying to display some images with XImage->Pixmap->Window,
|> by using XPutImage and XClearArea.  The problem is sometimes the old
|> image keeps appearing two or three times before the new one shows up.
|> I've tried putting an XFlush after XPutImage and before XClearArea but
|> it didn't help.  Any idea?
|> 
|>                                                         Curtz
|> 
|> p.s: It works fine when I use XImage->Window although I would prefer using
|>      a Pixmap.
|> 

It is unclear exactly how you are using XClearArea to redraw a window.
Is the pixmap the window's background pixmap?
--
					Eric Taylor
					Baylor College of Medicine
					etaylor@wilkins.bcm.tmc.edu
					(713) 798-3776