home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!daemon
- From: adrian@ora.com (Adrian Nye)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: The GC in XCopyPlane
- Message-ID: <1992Nov19.031538.25996@sm.sony.co.jp>
- Date: 19 Nov 92 03:15:38 GMT
- Sender: daemon@sm.sony.co.jp (The devil himself)
- Distribution: fj
- Organization: Workstation Div., Supermicro Systems Group, Sony Corporation
- Lines: 30
- Approved: michael@sm.sony.co.jp
-
- Message-Id: <9211182254.AA00531@spike.ora.com>
- In-Reply-To: Your message of Wed, 18 Nov 92 15:25:17 -0500. <199211182025.AA25150@ora.com>
- Date: Wed, 18 Nov 92 16:54:11 +0900
- Sender: adrian@ora.com
-
-
- > When I invoked XCopyPlane with my GC I had a BadMatch error. When I
- > used the default everything was OK (but in reverse video :-(). What
- > was worse was that I used XChangeGC to set them to my preferred way
- > and the code then worked without error.
- >
- > I find this behaviour very bizarre and I am at a loss to explain the
- > reason for the error. Is the error strikingly obvious or am I just
- > unlucky?
-
- Your problem is that the depths don't match. When you create a GC,
- you specify a drawable and the GC matches the depth of that drawable.
- If you then use that GC on a drawable of a different depth,
- you get an error.
-
- In this case, the pixmap has depth 1, so the GC (the way you created
- it) had depth 1, and then you tried to use it on a color drawable (with
- depth > 1). BadMatch.
-
- *************************************************************
- Adrian Nye (314) 531-1231 Editor, The X Resource
- O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks
- 4466 West Pine Blvd. 20-G St. Louis MO 63108
- Internet: adrian@ora.com UUCP: uunet!ora!adrian
- *************************************************************
-