home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19458 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.6 KB

  1. Path: sparky!uunet!pipex!warwick!uknet!lsl!snail
  2. From: snail@lsl.co.uk
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Load pixmap into pixmap
  5. Message-ID: <1992Nov23.123057.2669@lsl.co.uk>
  6. Date: 23 Nov 92 11:30:57 GMT
  7. References: <1992Nov7.142104.23123@alf.uib.no> <1992Nov16.184809.2642@lsl.co.uk> <890@metrix.UUCP>
  8. Organization: Laser-Scan Ltd., Cambridge
  9. Lines: 31
  10.  
  11. In article <890@metrix.UUCP>, ama@metrix.UUCP (Alan Amaral) writes:
  12. > What you have suggested is NOT guaranteed to work, as the window may be
  13. > unmapped, or partially or totally obscured, and backing store may not be
  14. > available.  Thus the copy that you get (if you get anything) in the pixmap
  15. > may not be what you expect.
  16. > Doing the XPutImage to the pixmap FIRST, and then copying from the pixmap to
  17. > the window will work in any case...
  18. > So, the code would look more like this:
  19. >                    XPutImage(dpy,pixmap, gc,image,0,0,posX,
  20. >                              posY,image->width, image->height);
  21. >                    XCopyArea(dpy, pixmap, win, gc,
  22. >                              0, 0, image->width, image->height,
  23. >                              PosX, PosY);
  24.  
  25. Indeed, you are correct, and it is the latter method we use where I work, I 
  26. should have addressed this when I posted, but I was more concerned with
  27. replacing the second PutImage with a CopyArea rather than ensuring the pixmap
  28. was first.
  29. > -- 
  30. > Alan Amaral             |  Email: ama@metrix.COM
  31. > Metrix Network Systems  |  Voice: (603) 888-7000
  32. -- 
  33. snail@lsl.co.uk      
  34.  
  35. "para-phrasing an American's .sig"....
  36. For the record, I did not vote for Bill Clinton
  37. :-)
  38.