Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!UIAMVS.BITNET!AWCTTYPA From: AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") Newsgroups: comp.sys.apple Subject: offscreen bitmaps on GS Message-ID: <8903140738.aa10330@SMOKE.BRL.MIL> Date: 14 Mar 89 12:25:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 35 >Date: Fri, 10 Mar 89 10:31:00 CST >From: "LARRY MICHALEWICZ...VAX OPERATOR" >Subject: Page flipping on IIgs > >First of I'm using the standalone version of TML Pascal. > >My first question is how can you do page flipping with the GS I know >it can be done, But I have never been able to draw off screen and >then display it to the screen. There's only one super-hires page, so you can't flip. You can certainly draw offscreen and then copy onto the screen, though. You need to understand a lot of QuickDraw concepts, including ports. Use NewHandle to get a fixed-location block of $AA bytes, and feed a _pointer_ to that block to OpenPort. Then allocate an off-screen pixel map for your port, set up an appropriate Loc Info record for your port, pointing to the pixel map you allocated, and then you can use SetPort to let QuickDraw draw to your offscreen port, and you can use stuff like CopyPixels, PaintPixels, etc, to copy images from your offscreen port to an on-screen port. >My second question...how can I create a background and then draw an >object over the background with changing the back ground. I've tried >some stuff using two windows, one with the backgound and one with the >object, but havn't had much luck. What did you try? PPToPort should do it with no problem. See the table on page 16-235 of TB Ref vol 2 for pen moes. It looks like you can use 1. PPToPort(sourcePort, srcRectangle, X, Y, 1). >Larry Michalewicz BitNet: LARRY@UNTVAX >Vax Programmer/Operator THENET: NTVAXB::LARRY >Student of computer Science Inter : LARRY@vaxb.acs.unt.edu >University of North Texas SPAN : UTSPAN::UTADNX::NTVAXB::LARRY >Denton, Texas 76203 AT&T : 1 (817) 565-5578