Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!usc!apple!bionet!ames!dftsrv!amarna.gsfc.nasa.gov!seiler From: seiler@amarna.gsfc.nasa.gov (Ed Seiler) Newsgroups: comp.sys.mac.programmer Subject: Need help creating a Quickdraw picture Message-ID: <2205@dftsrv.gsfc.nasa.gov> Date: 1 Jun 90 04:57:03 GMT Sender: news@dftsrv.gsfc.nasa.gov Reply-To: seiler@amarna.gsfc.nasa.gov Organization: NASA Goddard Space Flight Center - Greenbelt, MD, USA Lines: 24 News-Software: VAX/VMS VNEWS 1.3-4 I am trying to start with a raster image that I can successfully display in a window via CopyBits, and make it into a QuickDraw picture. Here's the pertinent code I am trying with: picHndl = OpenPicture(&(windPtr->portRect)); CopyBits(&(windPtr->portBits), &(windPtr->portBits), &(windPtr->portRect), &(windPtr->portRect), srcCopy, NULL); ClosePicture(); where picHndl is a PicHandle, and windPtr is a pointer to a window where the image has already been successfully displayed. It seems that the picture I get as a result starts off with the usual version opcode, version number, etc., but then I get an end-of-picture opcode without any of the copybits opcodes. What am I missing? BTW, the clip region was set previously via ClipRect(&(windPtr->portRect)); I am doing this using THINK C 3.01 as part of an XCMD for HyperCard. Edward Seiler seiler@dftnic.gsfc.nasa.gov Mail Code 635 seiler@chrpserv.gsfc.nasa.gov Goddard Space Flight Center (301) 286-9421 Greenbelt, MD 20771 "Against stupidity, the gods themselves contend in vain"