Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!ogicse!orstcs!mist.CS.ORST.EDU!boerned From: boerned@mist.CS.ORST.EDU (Dan Boerner) Newsgroups: comp.sys.mac.programmer Subject: A couple of color questions... Keywords: icon, icons, color Message-ID: <1991Apr29.234748.27798@lynx.CS.ORST.EDU> Date: 29 Apr 91 23:47:48 GMT Sender: boerned@cs.orst.edu Organization: Computer Science Department, Oregon State Univ. Lines: 29 Nntp-Posting-Host: mist.cs.orst.edu Question #1, Highlighting color icons Irked by the lack of tookbox calls to draw Icons in the new Icon Family, I've written my own. Everything is hunky-dory except my InvertFamilyIcon routine follows TN #55 and looks lame in color (the colors are inverted). I'd like to use the same algorithm that Finder 7.0 uses (dim the icon's palette down some percentage), but I've never messed with the Palette Manager and I'm not sure how difficult this would be. So, has anyone already solved this problem or know how to? Any Finder 7.0 programmers out there? Question #2, Choosing the Best Icon I've written a routine PlotBestFamilyIcon that will draw the icon that best matches the current port's pixeldepth. I'm currently doing this by looking at the port's portPixMap^.pixelSize field. (Yes I make sure its a color port) One problem however, is that if the port is created when the screen is set to say 8 bits depth and then the user switches depth via the Monitors cdev, the port is still 8 bits deep and my routine fails to notice the change in depth, so it chooses the wrong icon to draw. Is checking the pixel size a legitimate and safe method to determine which icon to draw? Is there another way that will tell me when the user changes the screen depth on the fly? Ok, so that was three questions, but whose counting :). I'll be glad to post the routines when I get them finished and tested. Thanks, Dan Boerner CS Master's Student @ Oregon State University boerned@cs.orst.edu