Path: utzoo!attcan!uunet!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing SICNs Message-ID: <2599@ilium.cs.swarthmore.edu> Date: 22 Mar 89 15:56:27 GMT References: <19167@srcsip.UUCP> Reply-To: jackiw@ilium.UUCP (Nick Jackiw) Organization: Visual Geometry Project, Swarthmore College, PA Lines: 36 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); 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_