Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!amdahl!nsc!taux01!cyosta From: cyosta@taux01.UUCP ( Yossie Silverman ) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing SICNs Message-ID: <1376@taux01.UUCP> Date: 29 Mar 89 08:58:55 GMT References: <19167@srcsip.UUCP> <2599@ilium.cs.swarthmore.edu> Reply-To: cyosta@taux01.UUCP ( Yossie Silverman ) Organization: National Semiconductor (IC) Ltd, Israel Lines: 45 In article <2599@ilium.cs.swarthmore.edu> jackiw@ilium.UUCP (Nick Jackiw) writes: .In article <19167@srcsip.UUCP> mnkonar@srcsip.UUCP (Murat N. Konar) writes: .> Does anyone out there have a code fragment that demonstrates how .> to plot a SICN? I can't find anything about this in IM or the .> Tech Notes. I did find out that SICN stands for "Script Symbol .> Icon" and not "Small Icon" as is the popular interpretation. .> .> Murat N. Konar Honeywell Systems & Research Center, Camden, MN . .SICNs are simply 16x16 bit-images, so you have to generate a bitmap .structure containing this image and use CopyBits or somesuch to plot it. .E.g. . . theSICN:=GetResource('SICN',Resource_ID); {Read it} . if theSICN<>nil then . begin {Successful resource-read} . with junkBitMap do . begin . rowBytes:=2; {16 bits=2 bytes} . SetRect(bounds,0,0,15,15); SetRect(bounds,0,0,16,16); <<<<===== . Hlock(theSICN); . baseAddr:=theSICN^ {Install ptr to bit-image} . end; . Copybits(junkBitMap,thePort^.portBits,junkBitMap.bounds, . destRect,srcCopy,NIL); {Draw it} . HUnlock(theSICN); . ReleaseResource(theSICN) . end; {Successful resource-read} . .This should work, although I haven't tested it. . . .-- .+-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+ .| nicholas jackiw | jackiw%campus.swarthmore.edu@swarthmr.bitnet | .+-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+ ."Ah...I've got this CHRONIC pain." _True Believer_ -- Yossie Silverman What did the Caspian sea? National Semiconductor Ltd. (Israel) - Saki UUCP: cyosta%taux01@nsc.COM NSA LSD FBI KGB PCP CIA MOSAD NUCLEAR MI5 SPY ASSASSINATE SDI -- OOCLAY ITAY