[comp.sys.mac.programmer] Problem: QuickDraw doesn't

mlab2@kuhub.cc.ukans.edu (01/16/91)

I have a number of offscreen bitmaps going in LSP.
Now for something really strange...

One of my offscreen maps is called offVirginPort.  So, calling
SetPort(offVirginPort); and then framing and filling rectangles, should give me
said graphics offscreen.  A quick CopyBits from the offscreen to the screen
should show me my handiwork.
It doesn't.
But it did for a while.  It worked for all of two days.  Then one day, it's not
drawing.  It will do it to the ONscreen if the main window is the active port,
but not offscreen.  CopyBits bring me nothing more than what was already in the
offscreen.  No rectangles.

My clipRect is large, I have the memory allocated for my project bumped way up,
all I did was add some more PICT resources to the programs resource fork.

When the resource map is read in, can it write over an open port?  Is there a
way to protect a port?  Has anyone ever had this problem?  Perhaps I'll rehash
the whole app from scratch and watch it very carefully.  I thought perhaps if
someone had encountered this anommally before it could save me a lot of time
and frustration.  Thanks in advance.

john calhoun

siegel@endor.uucp (Rich Siegel) (01/16/91)

In article <27924.279351b1@kuhub.cc.ukans.edu> mlab2@kuhub.cc.ukans.edu writes:
>I have a number of offscreen bitmaps going in LSP.
>Now for something really strange...
>
>One of my offscreen maps is called offVirginPort.  So, calling
>SetPort(offVirginPort); and then framing and filling rectangles, should give me

	Is OffVirginPort a GrafPtr or a GrafPort? If it's a GrafPtr, is it
actually the address of a GrafPort, or is it just a variable you declared?
Also, for the drawing to happen offscreen, you'll need to allocate an offscreen
bitmap of the size you want, and SetPortBits to it. (I usually do this with
an existing port like a window, but you may not have that luxury.)

R.



 Rich Siegel	Symantec Languages Group  Internet: siegel@endor.harvard.edu

"...she's dressed in yellow, she says 'Hello, come sit next to me, you
fine fellow..."