Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!yale!eagle.wesleyan.edu!rcook From: rcook@eagle.wesleyan.edu Newsgroups: comp.sys.mac.programmer Subject: What's the screen depth? Message-ID: <1991Mar28.110336.40826@eagle.wesleyan.edu> Date: 28 Mar 91 16:03:36 GMT Organization: Wesleyan University Lines: 27 Here's the deal: I have an old style window (ie not color, a standard grafport) and I do some color drawing in it with standard QuickDraw colors (by setting ForeColor and BackColor) This works fine on a machine in 16 color mode or higher, but everything comes out black on a 2 or 4 color machine. This is expected since standard QuickDraw isn't picky about how colors interact. Here's the problem: I know how to sense if a machine has Color QuickDraw, but how do you detect the bit depth/color mode? I don't want to move to color windows, because I want to keep only one set of drawing routines, thus not keeping parallel sets for standard and color quickdraw. Here's the disclaimer: I read through IM-V last night and the only place it seemed I could determine bit-depth was in a pixmap record. I checked the portbits field of my standard window (on a 256 color IIsi) and it was a true bitmap and not a pixmap, so I guess I can't figure things out that way. Tech note #276 (I think, which I don't have...) mentions a SetDepth routine. Is there an analogous GetDepth routine? If so, I couldn't find it in the tech note index. Please help me out on this one. At least I'm not asking about the sound manager (yet... :-) Thanks. -- ------------------------ Randall Cook rcook@eagle.wesleyan.edu ------------------------