Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!cbmvax!ken From: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Newsgroups: comp.sys.amiga.programmer Subject: Re: Sharing layers.library with intuition Message-ID: <17731@cbmvax.commodore.com> Date: 17 Jan 91 17:16:43 GMT References: <1991Jan11.001055.2055@mintaka.lcs.mit.edu> <17398@cbmvax.commodore.com> <1991Jan16.162030.7783@murdoch.acc.Virginia.EDU> <17689@cbmvax.commodore.com> Reply-To: ken@cbmvax.commodore.com (Ken Farinsky - CATS) Organization: Commodore, West Chester, PA Lines: 21 In article <17689@cbmvax.commodore.com> peter@cbmvax.commodore.com (Peter Cherna) writes: >In article <1991Jan16.162030.7783@murdoch.acc.Virginia.EDU> tmb@davinci.acc.Virginia.EDU (Thomas M. Breeden) writes: >>Is it in the same tricky territory to attempt to add a clipping >>rectangle within an Intuition window? > >No. It's actually fairly easy. See layers.library/InstallClipRegion(). >Here's a cheap simple example, with no guarantees :-) > > if ( myregion = NewRegion() ) [ . . . ] > OrRectRegion(myregion, &myrect); Be sure that you check the return codes of these routines! They can run out of memory and fail. Note that the RKM example code (in the layers chapter of Libs&Devs) does not properly check the returns (we all make mistakes. ;-) -- -- Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines uucp: ken@cbmvax.commodore.com or ...{uunet,rutgers}!cbmvax!ken bix: kfarinsky