tagreen@lothario.ucs.indiana.edu (Todd Green) (06/05/91)
Sorry if I missed this somewhere but is there a routine for drawing icl8's? IM VI 9-13 states that the Finder no longer uses PlotIcon() and PlotCIcon(), but that was about all I could find on color icons. No mention of icl4s, 8s, ics4 etc., etc. Please tell me I'm just brain dead and missed a page somewhere. Thanks, Todd -- Internet: tagreen@bronze.ucs.indiana.edu NeXTMail: tagreen@lothario.ucs.indiana.edu BitNet: tagreen@iubacs.bitnet
boerned@mist.CS.ORST.EDU (Dan Boerner) (06/06/91)
You haven't missed anything, there are no "documented" calls to draw icons from the new Icon Family ('icl8' included). A little birdy told me that there are "undocumented" calls to do this that are used by the 7.0 Finder and by Standard File. If anyone in netland with a guru factor higher than mine can figure out how to call these routines, especially the icon dimming routines, please let me know. I have written some pascal routines (converting to c should be no prob) that will plot any icon from the Icon Family. I've also written a version that will pick the best icon from the family based on the current monitor depth the icon is on. If the icon spans multiple monitors, it will draw each piece using the appropriate family icon member. A more difficult problem is highlighting the color icons. I have attempted to use the Finder's algorithm of changing clut's to the dim clut which contains 34 dimmed versions of the "34 Apple's Icon Colors". It *almost* works, for some reason bright colors like pure red don't dim. Why is this. I remind you that this *is* the red from the magic 34. Have I misinterpreted the Finder's algorithm? Why else would they have a 'clut' of dim colors laying around in the system file? I also wrote a routine to do the dimming by blending it with 50% gray. This works fine but needs to be done offscreen in order to be acceptable (you have to draw the mask then the icon, which results in a flash). Does anyone have some code that handles all the offscreen bitmap, pixmap offscreen GWorld stuff. We could combine the code and have some nice routines. Anyway, I will post the code if there is interest, but I'd prefer to have some beta testers beat on it before I post it. I'd like to avoid putting out version 1.3d2fc4 of this code in two months :). If you're interested in this send me email. ------- Dan Boerner Grad Slave Oregon State University "Too bad you can't get a Master's Degree for writing utility code..."