home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!spool.mu.edu!sdd.hp.com!network.ucsd.edu!munnari.oz.au!labtam!graeme
- From: graeme@labtam.labtam.oz.au (Graeme Gill)
- Subject: Re: new FAQ? (programming) masking Pixmaps *efficiently*
- Organization: Labtam Australia Pty. Ltd., Melbourne, Australia
- Date: Mon, 21 Dec 1992 03:45:12 GMT
- Message-ID: <1992Dec21.034512.18081@labtam.labtam.oz.au>
- Summary: Why arbitrary bit masks aren't supported directly.
- References: <1g45bpINNavm@agate.berkeley.edu> <1992Dec18.012904.15093@thunder.mcrcim.mcgill.edu>
- Keywords: Pixmap, mask, bitmap, graphic context
- Lines: 29
-
- In article <1992Dec18.012904.15093@thunder.mcrcim.mcgill.edu>, mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- > In article <1992Dec15.152852.2528@miki.pictel.com>, oj@miki.pictel.com (Oliver Jones) writes:
- > > In article <1992Dec11.180230.10091@elroy.jpl.nasa.gov> sns@bondi.jpl.nasa.gov (Sam Southard) writes:
- >
- > >> The server in question is probably doing the common thing and
- > >> converting clip-masks to rectangle lists.
- >
- > Yes...but the choice of this implementation means that clip-masks that
- > don't decompose nicely into rectangles will be expensive to set and
- > somewhat expensive to use.
- >
- > This implementation of clipping made sense in R3, before SHAPE, when
- > most clipping regions were the union of a few rectangles, though even
- > then, using it for client-specified GC clip masks (which are reasonably
- > likely to be complex) strikes me as at least questionable, requiring
- > further examination and thought.
-
- The reason anything more sophisticated has been put in the "too hard"
- basket (I guess) is that you basically would have to go around and duplicate
- every piece of rendering code in the X server. You then have to add an
- arbitrary bit clipping mask to one half of the duplicated code on top of
- everything else you have to do to get pixels on the screen (reading the
- destination, doing the logical op, masking with the plane mask, clipping
- to the clip rectangle). There is no incentive for anyone to do this while
- very few applications make use of an arbitrary bit mask. Application writers
- will tend to avoid using arbitrary clipping masks because they know they will
- be slow.
-
- Graeme Gill
-