home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!sol.ctr.columbia.edu!mhall
- From: mhall@occs.cs.oberlin.edu (Matthew Hall)
- Subject: Re: How many colours have YOU got?
- Organization: Oberlin College Computer Science
- In-Reply-To: bell@teal.csn.org's message of Tue, 8 Sep 1992 08:49:04 GMT
- References: <Bu94Hs.4H4@csn.org>
- Message-ID: <MHALL.92Sep8222315@occs.cs.oberlin.edu>
- Sender: news@ctr.columbia.edu (The Daily Lose)
- Date: Wed, 9 Sep 1992 03:23:15 GMT
- X-Posted-From: occs.cs.oberlin.edu
- X-Posted-Through: sol.ctr.columbia.edu
- Lines: 45
-
- In article <Bu94Hs.4H4@csn.org> bell@teal.csn.org (Bell Scott) writes:
- >
- > Question: In CycleSpy(tm), I have the Help and About windows set to
- > look at 'thePort' to determine the current colour depth. However, occasionally
- > this will cause a crash because for some weird reason the PixMap field becomes
- > an invalid address. The question is: How can I reliably tell what the current
- > colour depth is? ie: The user can change it via the 'Monitors' CDEV without
- > my specific knowledge. Before I refresh in response to an update event how do
- > I know what the depth is so I can display a legible window?
- >
- > Scott R. Bell
- > PS: Also, I am Colorado SuperNet using 'rn' under SunOS; how do I simply 'post'
- > a message? Right now all I can do is press 'f' and delete the References....
- > SRB
-
- The color depth for the current device is in
- TheGDevice^^.gdpmap^^.pixelsize.
- In multiscreen devices, your window may span more than one device. To
- figure out which device your window is in, look at all of the boundary
- rectangles of all the devices (I believe the devices are in a linked
- list). How you choose which depth you want to use (the deepest, the
- shallowest, or the one with the most area) is up to you. The
- structure of GDevices is in IMV and VI. You should probably read
- about them.
-
- Hope This helps
- -matt hall
-
- p.s. in rn, go to the end of the articles (should say something like
- 'End of articles') theres a key ($, &, or ? - should be in help) that
- will do this. Then hit f. It should ask you if you want to compose a
- new article. This is from my experience on an epx system. It should
- be the same for you
-
- --
-
-
- -------------------------------------------------------------------------------
- Matt Hall. mhall@occs.cs.edu OR SMH9666@OBERLIN.BITNET
- (216)-775-5805 (That's a Cleveland Area code. Lucky Me)
-
- "If a man comes up to you and says:
- 'A dog just carried away your ear.'
- Do you run after the dog, or search first for your ear?" - Moon over Morocco
-
-