Apple II Technical Notes _____________________________________________________________________________ Developer Technical Support Apple IIgs #4: Changing Graphics Modes in Mid-Application Revised by: Dave "Dave" Lyons, C.K. Haun & Dan Oliver January 1991 Written by: Dan Oliver October 1986 This Technical Note discusses how to switch between the two graphics modes, 320 and 640 horizontal resolution, while running an application which usesthe Window, Control, and Menu Managers. Changes since May 1990: Added information about reinstalling fonts after restarting QuickDraw II. _____________________________________________________________________________ Why Change Resolution? Why not? There are certain applications where the ability to run in both modes is essential; most graphics applications fall into this category.Other applications might switch modes to provide features which their competitors lack; a financial application might display figures in 640 mode and charts in 320 mode. Still other applications may want to give the user the choice. A word processor might seem useful only in 640 mode, but what if the user wants to print greeting cards with pictures? The user does not need the linelength provided in 640 mode but does need the added color of 320 mode for the pictures. Let me preach a little. I have worked on other machines with different graphic modes and learned some things that might be of use to application programmers. Many application programmers fight mode switching with either rhetoric or apathy, then when users expect their software to run in either mode, they become frustrated when it does not allow switching. To avoid the problem of frustrating the user, you can provide mode switching (which is not as hard as you might think). How To Change Modes First, assume you are in an application which is running with a system menu bar, a few visible windows with scroll bars, and one window with somestandard controls. At some point, the user decides to change modes, possibly via a menu item thoughtfully provided by the application programmer. Your change mode handler might look like the following: ; ; --- This step is necessary if QuickDraw Auxiliary is started --------------- _QDAuxShutDown ;Shut down QDAux first ; ---------------------------------------------------------------------------- _QDShutdown ;Shut down QuickDraw. ;This will turn graphics off so you will see ;the text screen for a second (a advertisement ;might go here). lda