home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!teal!raney
- From: raney@teal.csn.org (Scott Raney)
- Subject: Re: Non-rectangular bitmaps/setting pixmap background...
- Message-ID: <raney.712034535@teal>
- Sender: news@csn.org (news)
- Nntp-Posting-Host: teal.csn.org
- Organization: Colorado SuperNet, Inc.
- References: <1992Jul13.194934.5605@news.cs.brandeis.edu> <raney.711494247@teal> <1992Jul24.181510.29269@thunder.mcrcim.mcgill.edu>
- Date: Sat, 25 Jul 1992 03:22:15 GMT
- Lines: 65
-
- mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
-
- >In article <raney.711494247@teal>, raney@teal.csn.org (Scott Raney) writes:
- >> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
- >>> In article <1992Jul13.194934.5605@news.cs.brandeis.edu>, slanka@chaos.cs.brandeis.edu (Ishantha Lokuge) writes:
- >>>> I am trying to create a non-rectangular bitmap...
- >>> This is not possible. You'll have to get the effect you want some
- >>> other way.
- >> I say it *is* possible, but the process is nontrivial.
-
- >A bitmap is a depth-1 pixmap. Pixmaps are, by definition, rectangular
- >arrays of pixels. Thus, non-rectangular bitmaps don't exist any more
- >than, say, OutputOnly windows do.
-
- OK, a question of semantics. What's important is that the *effect*
- can be achieved.
-
- >> Unfortunately, the X server designers chose to implement clip masks
- >> by converting them to rectangle lists instead of developing a three
- >> element logic op.
-
- >This has come up on the net before. As I recall, it was done not to
- >avoid three-element logic but to avoid *four*-element logic. Consider
- >drawing stippled text, for example.
-
- Nope, the reason was that many "intelligent" graphics controllers
- couldn't handle it. Rather than have several different ways of doing
- clipping, the kluge of converting clipping masks to rectangle lists
- was developed.
-
- >> The result? Setting a full screen clip mask on a 386 takes several
- >> seconds. Clipping a wide polyline to the mask can take several
- >> *minutes*. If it had been implemented as a mask, the results would
- >> be about 50% slower than regular operations. As it is, X clipmasks
- >> are essentially useless.
-
- >So don't complain; do something about it! If you were to contribute
- >efficient code for doing clipmasks as masks, I'm sure lots of people
- >would love you for it. (Of course, you also might, in the process,
- >discover why it wasn't done that way - I don't know; I haven't looked
- >at it at all.)
-
- Since we're effectively doing a 3 element logic op in MetaCard, I
- submit that it isn't technically all that difficult. The problem is
- code maintenance, not the state of the art. The bottom line is that
- you can't use clipmasks for clipping to large or complex images.
-
- >It could also just be that your 386 is a pig. I've done circular
- >clocks on the Sun-3/50 on my desk that are approximately a thousand
- >pixels in diameter and it takes a second maybe, but not "several"
- >seconds.
-
- *All* 386/VGA systems are pigs. Our Sun 3/60 draws faster.
-
- A circular area is a relatively easy case. Try a 500 pixel square 50%
- dither!
-
- > der Mouse
-
- > mouse@larry.mcrcim.mcgill.edu
- --
- ***********************************************************************
- * Scott Raney 303-447-3936 Remember: the better you look, *
- * raney@metacard.com the more you'll see -- Lidia *
- ***********************************************************************
-