Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!well!svc From: svc@well.UUCP (Leonard Rosenthol) Newsgroups: comp.sys.mac Subject: Re: Does Finder display color icon (cicn)? Summary: More kludgy hack... Message-ID: <12089@well.UUCP> Date: 9 Jun 89 16:46:09 GMT References: <2237@internal.Apple.COM> <10944@cit-vax.Caltech.Edu> Lines: 26 In article <10944@cit-vax.Caltech.Edu>, wetter@cit-vax.Caltech.Edu (Pierce T. Wetter) writes: > LSR@apple writes: > -> I don't think so. My understanding is that there is special code in > -> 32-bit Color Quickdraw to handle just its own icon. Installing 32-bit > -> Quickdraw does not make it possible for other icons to appear in full > -> color. > > "Special Code" is AppleSpeak for Kludgy Hack. > It's actually more of a 'kludgy hack' than you realize...In a fit of insanity a couple of us decided to disassemble the 32bit QD file to find out how it is doing the color icon on the desktop. Boy is it a BIG HACK! What they do is patch CopyBits (since that is how the Finder (and many other apps) draw their icons). The patch checks the bitmap.bounds to see if it is a 32X32 square (an icon). If it is then it does (heres the best part) a BIT BY BIT COMPARISON of the bitmap to draw vs. their HARDCODED bitmap. (just change their icon in the slightest and watch the color dissappear...) Thought I would pass on this wonderful info so you could all give Apple the bronx cheer on this one...Now if only I could write code like that and have it approved by my boss :-) -- +--------------------------------------------------+ Leonard Rosenthol | GEnie : MACgician Lazerware, inc. | MacNet: MACgician UUCP: svc@well.UUCP | ALink : D0025