Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!uvaarpa!mcnc!thorin!phi!markham From: markham@phi.cs.unc.edu (Andrew Markham) Newsgroups: comp.sys.mac.programmer Subject: Storing an icon as a region (or is it worth it) Keywords: Handle, RgnHandle, etc. Message-ID: <9043@thorin.cs.unc.edu> Date: 31 Jul 89 18:53:42 GMT Sender: news@thorin.cs.unc.edu Lines: 50 I would like to take an ICON resource, read it in and somehow store it as a Region so that I can take advantage of the "Quickness" of regions in comparison to icons. Basically I do the following: /* this to get it initially */ GetIcon(theIcon,iconID); SetRect(theRect,left,top,right,bottom); PlotIcon(theRect,theIcon); /* and this to move it around */ EraseRect(theRect); OffsetRect(theRect, horiz, vert); PlotIcon(theRect,theIcon); in order to move the icon around on the screen. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= It just seems that it would be much faster to do this: /* this to get it initially */ GetIcon(theIcon,iconID); iconRgn:= NewRgn; OpenRgn; SetRect(theRect,left,top,right,bottom); PlotIcon(theRect,theIcon); /* does this work? it didn't for me */ CloseRgn(iconRgn); /* and this to move it around */ EraseRgn(iconRgn); OffsetRgn(iconRgn,horiz,vert); FrameRgn(iconRgn); I would think this possible, but what am I doing wrong? Is there a better way to do this? It seems pretty cumbersome, but I found no better "obvious" way. Plus, I just started and haven't become accustomed to regions, bitmaps, etc... Please e-mail any advice. Thank you, Andrew W. Markham Computer Science Department UNC-CH "Nobody in the world can cover my main man Michael Jordan. No, No, Nooobody." -Mars Blackmon