Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Pixmaps In Pict's Message-ID: <21812@well.sf.ca.us> Date: 24 Nov 90 05:41:43 GMT References: <2488.274A5E63@blkcat.fidonet.org> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 27 To get a pixmap into a PICT you just do a CopyBits between OpenPicture() ClosePicture() calls. The secret is, the current port for all this must be a color grafport. The easiest way to get a color grafport is just add the appropriate resource to your program (assuming you create your windows with GetNewWindow() or GetNewDialog()). a sample 'wctb' resource looks like this: resource 'wctb' (129) { 0x0, 0, { /* array ColorSpec: 0 elements */ } }; or in RMaker Type wctb=GNRL , 129 .H 00 00 00 00 00 00 use dctb for dialogs. Watch out for the following: GetNewWindow and GetNewDialog do nothing with palettes, while GetNewCWindow grabs the palette automatically. As always, do a ClipRect(&thePort->portRect); before recording a picture, since the default clip will overflow to the emptyRect on playback. And watch out got clipping in general when you use this technique. -- -- David Phillip Oster - At least the government doesn't make death worse. -- oster@well.sf.ca.us = {backbone}!well!oster