Article View: comp.sys.mac
Article #7317Help with SetPortBits
From: Brian Keller
Date: Sun, 29 Oct 1989 04:50
Date: Sun, 29 Oct 1989 04:50
26 lines
1270 bytes
1270 bytes
I'm trying to use SetPortBits to draw off screen so I can then use CopyBits to dump on the screen. However, when I try to set the active port back to the window, I can't draw anything new in it. Basically the procedure is as follows: procedure UpKeep; var UPDRect,ARect : Rect; WinBits,OldPtr : BitPtr; SavePort : GrafPtr; begin GetPort(SavePort); UPDRect:=SavePort^.portRect; New(WinBits); WinBits^.rowBytes:=SavePort^.portBits.rowBytes; WinBits^.bounds:=SavePort^.portBits.bounds; OldPtr:=@SavePort^.portBits; SetPortBits(WinBits^); SetPortBits(OldPtr^); <<<< ... draw stuff - it never appears?? ... If I take out the line with "<<<<" the picture gets drawn to the screen as expected. I've tried setting OldPtr to everything I can think of, but I never seem to be able to get back to the original screen. Help!!!!!!! -------
Technical Details
Message-ID:
<12537876082.2.B.BSK@Macbeth.Stanford.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!MACBETH.STANFORD.EDU!B.BSKShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!MACBETH.STANFORD.EDU!B.BSK From: B.BSK@MACBETH.STANFORD.EDU (Brian Keller) Newsgroups: comp.sys.mac Subject: Help with SetPortBits Message-ID: <12537876082.2.B.BSK@Macbeth.Stanford.EDU> Date: 29 Oct 89 04:50:19 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 26