Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!sri-spam!ames!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: Layers Lib./Clipping Message-ID: <8712031916.AA04108@cory.Berkeley.EDU> Date: Thu, 3-Dec-87 14:16:29 EST Article-I.D.: cory.8712031916.AA04108 Posted: Thu Dec 3 14:16:29 1987 Date-Received: Mon, 7-Dec-87 06:03:32 EST Sender: daemon@ucbvax.BERKELEY.EDU Lines: 31 > Also, can anyone give me any idea of the processing costs of > implementing Layers Lib. clipping. I am working with 3-D images > and must clip in Z space anyway. Will the Layers functions be > faster/slower than algorithmically croping the images? > > Thanks again, > > Wade. There is a noticeable overhead. The layers lib is setup to handle more general clipping... multiple overlapping windows etc... Also the fact that the library calls use only the lower 16 bits for X,Y positions means that you cannot pass arbitrary 32 bit quantities and assume they will be properly clipped. I suggest you do your own clipping. There are numerous algorithms for clipping more complex objects like polygons. Line clipping is relatively trivial. I think the layer functions would both be slower and inadequate. USING LAYERS TO CLIP: You need to create a layer. Creation of a layer requires a 'base'... A Layer_Info. If using Intuition screens simply use the Screen structure's Layer_Info. Otherwise use the NewLayerInfo() layers.library call. Then use CreateUpfrontLayer() with the screen's Layer_Info and screen's bitmap. Use the layer->rp (the layer's rastport) to render into. -Matt