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

  1. Path: sparky!uunet!mcsun!uknet!lsl!snail
  2. From: snail@lsl.co.uk
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Load pixmap into pixmap
  5. Message-ID: <1992Nov16.184809.2642@lsl.co.uk>
  6. Date: 16 Nov 92 17:48:09 GMT
  7. References: <1992Nov7.142104.23123@alf.uib.no>
  8. Organization: Laser-Scan Ltd., Cambridge
  9. Lines: 29
  10.  
  11. In article <1992Nov7.142104.23123@alf.uib.no>, singg@alf.uib.no (Kurt George Gjerde) writes:
  12. > I use the following code for loading a pixmap and drawing it inside
  13. > another pixmap:
  14. > Are there any faster ways to do this?? 
  15. [deleted...]
  16. >                 if (XGetGeometry(dpy,userpixmap, &d_root, &d_x, &d_y, &width,
  17. >                              &height, &d_border_width, &d_depth)) {
  18. >                    image  = XGetImage(dpy, userpixmap, 0,0, width, height,
  19. >                                        1, XYPixmap);
  20. >                    XPutImage(dpy,win, gc,image,0,0,posX,
  21. >                              posY,image->width, image->height);
  22. >                    XPutImage(dpy,pixmap, gc,image,0,0,posX,
  23. >                              posY,image->width, image->height);
  24.  
  25. swap the second XPutImage with an XCopyArea from the 'win' to the 'pixmap'.
  26. as follows:-
  27.                      XCopyArea(dpy, win, pixmap, gc,
  28.                                0, 0, image->width, image->height,
  29.                                PosX, PosY);
  30. >                    XFree(image);
  31. >                 }
  32. -- 
  33. snail@lsl.co.uk      
  34.  
  35. You Have To Remember, You Need To Beleive,
  36. The Time Has Past, Dust In The Leaves.
  37.