[comp.sys.mac.programmer] Off-Screen Pix Maps: DrawPicture doesn't work. Can U help?

gbrown@tybalt.caltech.edu (Glenn C. Brown) (06/02/90)

I am attempting to spool a PICT file from disc to an off-screen PixMap.

Following the explaination in IM v.V, I was easily able to spool PICTs
from my HD to an open window.  I was also fairly easily able to allocate
off-screen PixMap's for my window.  I am able to draw to the off-screen
PixMap with normal QD commands and copy the results to the window on-
screen.  However I cannot get DrawPicture to draw to the PixMap.

For example, the following works:

SetPort(GrafPtr(MyWindow));
DrawPicture(PICTHandle,PICTFrame);
SetPort(GrafPtr(MyWindow));
UpdateWindow;  {This routine copies the PixMap to the Window}

The above will momentarily display the PICT and then re-display the
contents of the PixMap...  But the following doesn't Work:

SetPort(GrafPtr(MyCGrafPort));
DrawPicture(PICTHandle,PICTFrame);
SetPort(GrafPtr(MyWindow));
UpdateWindow;  {This routine copies the PixMap to the Window}

The machine usually freezes (but interupts still operate).

I can make the 1st snippet of code freeze in the same way if I change
myWindow to a CWindow rather than a Window.

Does anyone have any Idea what might be causing this?

Thank you,
--Glenn Brown
  gbrown@tybalt.caltech.edu