Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!rutgers!ames!amdahl!nsc!voder!apple!lsr From: lsr@apple.UUCP (Larry Rosenstein) Newsgroups: comp.sys.mac Subject: Re: Delphi digest volume 3, issue 36 Message-ID: <1430@apple.UUCP> Date: Tue, 4-Aug-87 18:46:10 EDT Article-I.D.: apple.1430 Posted: Tue Aug 4 18:46:10 1987 Date-Received: Thu, 6-Aug-87 07:10:23 EDT References: <2640@husc6.UUCP> Reply-To: lsr@apple.UUCP (Larry Rosenstein) Distribution: world Organization: Advanced Technology Group, Apple Computer Lines: 42 In article <2640@husc6.UUCP> fry@huma1.UUCP (David Fry) writes: >>From: JIMH >>Subject: changing pixel depth >>Date: 25-JUL 01:47 Macintosh II > >>Does anyone know how the monitor cdev cause the desktop (or any >>programs) to redraw themselve with the new screen depth? I want a fkey >>to toggle between 1 and 8 bit mode. It pretty straightforward to set >>the mode to whatever depth you need and when you r elaunch the finder >>(return to finder you have new depth set. what is less straightforward >>is to get the desktop to draw itself without a launch. best jim > >I've been using this method with success. It assumes a menu >bar is present, but I guess you'd have to check that. > >...(code omitted)... It seems to me that one could just call PaintBehind(WindowPeek(FrontWindow), theRgn) rather than looping and calling PaintOne. (PaintBehind does a similar loop already.) You should not use GrayRgn as theRgn because GrayRgn includes all the screens on the system. You generally want to update only the screen that changed. You can get the screen's size and location from the GDHandle of that graphics device. Simply use NewRgn & RectRgn to convert the rectangle into a region. (You can use the same rectangle to paint things black. It should not be necessary to erase the whole screen first, however.) I think that this should work, but I don't have a Mac II to check it out. -- Larry Rosenstein Object Specialist Apple Computer AppleLink: Rosenstein1 UUCP: {sun, voder, nsc, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.com