Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Opening and Displaying PICT files Message-ID: <21595@well.sf.ca.us> Date: 10 Nov 90 09:41:29 GMT References: <1990Nov6.024454.4605@hub.cs.jmu.edu> Distribution: comp Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 25 There is a tech note on dispaying pictures. OpenPicture has nothing to do with opening PICT files and displaying them. OpenPicture records a PICT into a data structure so you can WRITE it. To READ a Pict, the easy way is, if it will fit in memory, read it into a handle, then: Rect r; PicHandle pic; ... get pic... r = (**pic).picFrame; OffsetRect(&r, -r.left, -r.top); DrawPicture(pic, &r); remember that you must be using a color window for a PICT 2 to play correctly, and that while NewCWindow() manipulates palettes for you, if you are using a 'wtcb', a 'actb', or a 'dctb' resource to get color from GetNewWindow(), GetNewDialog(), or Alert() respectively, that these won't manipulate the palettes for you. Remember that when you are recording pictures you should do a ClipRect(&thePort->portRect) to keep the clip included in the picture from overflowing. -- -- David Phillip Oster - Note new signature. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster