Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!rutgers!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Bit Depth question Message-ID: <2467@ilium.cs.swarthmore.edu> Date: 21 Feb 89 17:07:30 GMT References: <6421@saturn.ucsc.edu> Reply-To: jackiw@ilium.UUCP (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 26 In article <6421@saturn.ucsc.edu> kim@ucschu.UCSC.EDU.ucsc.edu (New User Name) writes: > > I'm trying to determine and set the bit depth level of the monitors > of the Mac II. Is there anyone who knows where to find the variable containing > the Bit Depth information. > > Thanks > > Kim Cf InsideMacintosh Volume V, the Graphics Devices chapter. Global variables MainDevice ($8A4) and theGDevice ($CC8) contain handles to the main (menu bar) and current devices. You can traverse the list of all devices using FUNCTION GetDeviceList:GDHandle; for the first entry and GetNextDevice(afterThisDevice:GDHandle):GDHandle. Each GDHandle points to a GDevice record, of which the 'gdPMap' field (offset $16) is a PixMap Handle for the device. PixMapHandle^^.pixelSize (offset $20) gives you an integer/word containing the number of bits/pixel, i. e. the bit-depth. -- +-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+ | nicholas jackiw | jackiw%campus.swarthmore.edu@swarthmr.bitnet | +-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+ By the time my employer decides on its opinion, I'll be dead.