home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!lsl!snail
- From: snail@lsl.co.uk
- Newsgroups: comp.windows.x
- Subject: Re: Load pixmap into pixmap
- Message-ID: <1992Nov16.184809.2642@lsl.co.uk>
- Date: 16 Nov 92 17:48:09 GMT
- References: <1992Nov7.142104.23123@alf.uib.no>
- Organization: Laser-Scan Ltd., Cambridge
- Lines: 29
-
- In article <1992Nov7.142104.23123@alf.uib.no>, singg@alf.uib.no (Kurt George Gjerde) writes:
- > I use the following code for loading a pixmap and drawing it inside
- > another pixmap:
- > Are there any faster ways to do this??
- [deleted...]
- > if (XGetGeometry(dpy,userpixmap, &d_root, &d_x, &d_y, &width,
- > &height, &d_border_width, &d_depth)) {
- >
- > image = XGetImage(dpy, userpixmap, 0,0, width, height,
- > 1, XYPixmap);
- >
- > XPutImage(dpy,win, gc,image,0,0,posX,
- > posY,image->width, image->height);
- > XPutImage(dpy,pixmap, gc,image,0,0,posX,
- > posY,image->width, image->height);
-
- swap the second XPutImage with an XCopyArea from the 'win' to the 'pixmap'.
- as follows:-
- XCopyArea(dpy, win, pixmap, gc,
- 0, 0, image->width, image->height,
- PosX, PosY);
- >
- > XFree(image);
- > }
- --
- snail@lsl.co.uk
-
- You Have To Remember, You Need To Beleive,
- The Time Has Past, Dust In The Leaves.
-