Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!world!aep From: aep@world.std.com (Andrew E Page) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing to the screen Message-ID: <1991Jun12.122145.3374@world.std.com> Date: 12 Jun 91 12:21:45 GMT References: <=CA-L1H@cs.widener.edu> Organization: The World Public Access UNIX, Brookline, MA Lines: 32 In article <=CA-L1H@cs.widener.edu> dxandy@cs.widener.edu (Andrew J. Greenshields N3IGS) writes: > > > I have another question about a background for an animation. I had thought >that it might be possible to open more than one GrafPort for a window and >use one for the background and one for the animation. How do you force the >background to redraw after it has been covered by another graphic item? > If you study with window manager you will probably find almost everything that you've asked for. The window structure contains an Update Region. This region is an area of the window that is treated, by the window manager as the window is covered and uncovered, it is also affected by your program(if properly written). Basically it's like this... The Update region is the part of the window that needs to be redrawn at any given time. When a window is covered, and then uncovered, the part that is again revealed will need to be redrawn. You force a part of the window(or the window manager does it for you) by calling InvalRect or InvalRgn. The Window mangers posts an upadateEvt through the event manager, when an the applications loop picks up the update event(with the window's pointer in the EventRecord.message) the application redraws with windows accordingly. It's complicated, but once you are into it you'll see that is has a very elegant feel to it. -- Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow Concepts Enginerring | The difference between what we are Macintosh and DSP Technology | and what we want to be.