home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: Problem copying from Window to Pixmap
- Message-ID: <1992Dec18.013508.15485@thunder.mcrcim.mcgill.edu>
- Organization: McGill Research Centre for Intelligent Machines
- References: <BzB2vH.Fup@dutiws.twi.tudelft.nl>
- Date: Fri, 18 Dec 92 01:35:08 GMT
- Lines: 21
-
- In article <BzB2vH.Fup@dutiws.twi.tudelft.nl>, graaff@IS.TWI.TUDelft.NL (Hans de Graaff) writes:
-
- > I have a problem copying data from a Window to a Pixmap.
- > I have the following code to do that:
-
- > Pixmap pm = XCreatePixmap(dpy, xwin, w, h, 1);
- > XCopyPlane(dpy, xwin, pm, gc, 0, 0, w, h, 0, 0, 1L);
-
- > X Error of failed request: BadMatch (invalid parameter attributes)
- > Major opcode of failed request: 63 (X_CopyPlane)
-
- Most likely the GC depth matches the depth of xwin rather than the
- depth of pm. Try creating a GC using pm as the drawable instead.
- (Make sure to set the foreground and background values appropriately
- for what you want; the default values would cause XCopyPlane to invert
- the bitplane it copies, which could be confusing.)
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-