Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Determining if monitor supports color? Message-ID: Date: 17 Jul 90 20:02:01 GMT References: <7891@fy.sei.cmu.edu> Reply-To: jackiw@cs.swarthmore.edu (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 34 weinstoc@sei.cmu.edu (Chuck Weinstock) writes: > Could someone tell me how to > decide whether a color monitor is present, or point me at the relevant > documentation? Thanks. > > Chuck Weinstock You have a graphics device capable of displaying color if GetMaxDevice^^.gdPMap^^.pixelSize>1 GetMaxDevice returns a handle to the Graphics Device of greatest pixel depth. gdPMap is the pixMap which images the device; pixelSize is the number of bits allocated to an individual pixel on this device. Note that for most practical purposes you'll want to check if pixelSize>2. 2-bit mode, while technically colored, is pretty lame. Note also that this call doesn't distinguish between color and gray-scale. Most of the time, you'll want to ignore this distinction. If not, you may want to examine theDevice^^.gdMode field...I'm not sure what needs to be done here. Check out Chapter 5 of Inside Mac Volume 5. Chapters 6 and 7 are related, too. -Nick -- -----Nick Jackiw [jackiw@cs.swarthmore.edu|jackiw@swarthmr.bitnet------ "This orbe of starres fixed infinitely vp extendeth hitself in altitvde sphericallye, and therefore immovable the pallace of foelicity garnished with perpetvall shining glorious lightes innvmerable." - Thomas Digges