Path: utzoo!attcan!uunet!aplcen!samsung!zaphod.mps.ohio-state.edu!wuarchive!cs.utexas.edu!rutgers!cbmvax!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.tech Subject: Re: ClipRect's, Intuition & User code.. Message-ID: <18129527.ARN02064@swinjm.UUCP> Date: 19 Oct 90 10:23:35 GMT References: <4863@baird.cs.strath.ac.uk> Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Followup-To: comp.sys.amiga.tech Distribution: comp.sys.amiga.tech Organization: The Software Winery Lines: 45 In article <4863@baird.cs.strath.ac.uk>, Brian J Syme IE88 writes: > [...] Is it possible > to 'and' in an additional clipping rectangle without disturbing Intuition's > use of them (for gadgets, etc.) in a manner similar to Begin/EndUpdate() > (or whatever it's called.) > > I assume the answer to my question is "no, you can't" [...] Do not assume that. I just found (six month ago!) that Intuition have a function to do that (since AmigaOS 1.2 :-). (You have to open layers.library too) Here an example: MyClipList( rp, list ) { struct Rectangle rect; struct Region *oldregion, *listregion; if (! (listregion = (struct Region *) NewRegion())) return; rect.MinX = list->MinX; rect.MinY = list->MinY; rect.MaxX = list->MaxX; rect.MaxY = list->MaxY; if (! OrRectRegion( listregion, &rect )) { DisposeRegion( listregion ); return; } oldregion = InstallClipRegion( rp->Layer, listregion ); MyDrawList( rp, list ); /* <== it's there !!! */ InstallClipRegion( rp->Layer, oldregion ); DisposeRegion( listregion ); } Note that if you need, you can add more rectangles to your listregion. Best regards, Jean-Michel -- \___/ Jean-Michel Forgeas \-/ cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery -^- And, where is the universe ?