Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!munnari.oz.au!labtam!graeme From: graeme@labtam.labtam.oz (Graeme Gill) Newsgroups: comp.windows.x Subject: Re: question on using GC Functions for levels of overlap Summary: Use bit planes as overlay planes Message-ID: <10496@labtam.labtam.oz> Date: 3 May 91 04:26:38 GMT References: <9105021410.AA18438@lightning.McRCIM.McGill.EDU> Organization: Labtam Australia Pty. Ltd., Melbourne, Australia Lines: 21 In article <9105021410.AA18438@lightning.McRCIM.McGill.EDU>, mouse@lightning.mcrcim.mcgill.EDU (der Mouse) writes: > > Ken Lee writes: > > Can anyone give me some ideas on drawing overlapping objects on the > > screen in such a way that the colors indicate the level of overlap > > (i.e. single, double, triple, ...). .... > I'd say they're not supported at all in X. If you want the equivalent > of GXadd, you have to GetImage the pictures back to the client, add > them there, and send them back to the server, or else do bit-by-bit > addition with XCopyPlane and plane-masks and such. All alternatives > are ugly and likely to be slow. > The simplest idea is to allow up to 8 overlay planes, one per pixel plane. The colour map is then set up so that it naturally gives the correct colour for the sum of the planes present. To write to an overlay plane simply set the plane mask to the appropriate plane and draw objects as per usual. There is no need for a GXadd logical operation. This scheme won't handle more than 8 overlapping objects of course. Graeme Gill Labtam Australia