Path: utzoo!attcan!uunet!husc6!rutgers!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Question about clipRect and OpenPicture Message-ID: <20309@apple.Apple.COM> Date: 10 Nov 88 00:16:07 GMT References: <749@cs.rit.edu> Organization: Advanced Technology Group, Apple Computer Lines: 20 In article <749@cs.rit.edu> ark@cs.rit.edu (Alan Kaminsky) writes: > >I found all this very obscure. Can someone (a) tell me why one can't use the >default clipRect, and (b) post or send a code fragment (C or Pascal) that shows >me everything I am supposed to do when I create a picture and when I draw the >picture? The problem is that if you then draw the picture at some place other than its original position, that default clipRect gets offset as well. Unfortunately, the coordinates will overflow if the offset is more than 1 pixel (or so). The solution is to call ClipRect before or after calling OpenPicture. In general, you would pass the same rectangle to ClipRect and OpenPicture. Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 46-B Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr