Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!polya!kaufman From: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Offseting a picture with DrawPicture Keywords: DrawPicture problem clipping PICT Message-ID: <3156@polya.Stanford.EDU> Date: 30 Jun 88 15:55:19 GMT References: <1578@microsoft.UUCP> Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Organization: Stanford University Lines: 20 In article <1578@microsoft.UUCP> t-benw@forward.UUCP (Benjamin Waldman) writes: >He's reading in a picture from a PICT file (yes, and skipping th 512 >byte header), finding out its bounding rect, using OffsetRect, and >using DrawPicture to draw the picture in the new rect. The problem is that >nothing is printing out. >He's drawing to a printer, and is using ClipRect before the DrawPicture >to set the clipping region to the entire page (rPage). Does the picture >have info about its own clipping region that is conflicting with the new >one? Yes, the PICT files (may) have clipping. However, drawing from a PICT file is a lot like copybits... the entire PICT (as defined by the bounding rect) is scaled and translated to fit into the dstRect specified by the DrawPicture call. The clipping region he specifies should encompass his dstRect. No 'offset' should be necessary. Setting the clipping region to PrInfo.rpage (or even to rpaper) should work fine. Marc Kaufman (kaufman@polya.stanford.edu)