home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / fj / maillis / xwindow / 17525 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.8 KB

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!wupost!ukma!netsys!agate!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!daemon
  2. From: snail@lsl.co.uk
  3. Newsgroups: fj.mail-lists.x-window
  4. Subject: Re: Load pixmap into pixmap
  5. Message-ID: <1992Nov17.033114.9145@sm.sony.co.jp>
  6. Date: 17 Nov 92 03:31:14 GMT
  7. Sender: daemon@sm.sony.co.jp (The devil himself)
  8. Distribution: fj
  9. Organization: Laser-Scan Ltd., Cambridge
  10. Lines: 35
  11. Approved: michael@sm.sony.co.jp
  12.  
  13. Date: 16 Nov 92 17:48:09 GMT
  14. Message-Id: <1992Nov16.184809.2642@lsl.co.uk>
  15. Newsgroups: comp.windows.x
  16. References: <1992Nov7.142104.23123@alf.uib.no>
  17. Sender: xpert-request@expo.lcs.mit.edu
  18.  
  19. In article <1992Nov7.142104.23123@alf.uib.no>, singg@alf.uib.no (Kurt George Gjerde) writes:
  20. > I use the following code for loading a pixmap and drawing it inside
  21. > another pixmap:
  22. > Are there any faster ways to do this?? 
  23. [deleted...]
  24. >                 if (XGetGeometry(dpy,userpixmap, &d_root, &d_x, &d_y, &width,
  25. >                              &height, &d_border_width, &d_depth)) {
  26. >                    image  = XGetImage(dpy, userpixmap, 0,0, width, height,
  27. >                                        1, XYPixmap);
  28. >                    XPutImage(dpy,win, gc,image,0,0,posX,
  29. >                              posY,image->width, image->height);
  30. >                    XPutImage(dpy,pixmap, gc,image,0,0,posX,
  31. >                              posY,image->width, image->height);
  32.  
  33. swap the second XPutImage with an XCopyArea from the 'win' to the 'pixmap'.
  34. as follows:-
  35.                      XCopyArea(dpy, win, pixmap, gc,
  36.                                0, 0, image->width, image->height,
  37.                                PosX, PosY);
  38. >                    XFree(image);
  39. >                 }
  40. -- 
  41. snail@lsl.co.uk      
  42.  
  43. You Have To Remember, You Need To Beleive,
  44. The Time Has Past, Dust In The Leaves.
  45.