Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /


Chapter 6 - Offscreen Graphics Worlds

This chapter describes QuickDraw routines and data structures that your application can use to create offscreen graphics worlds. Whether your application uses Color QuickDraw or basic QuickDraw, you should read this chapter to improve your application's appearance and performance when it draws onscreen images.

Read this chapter to learn how to set up and use an offscreen graphics world--a sophisticated environment for preparing complex color or black-and-white images before displaying them on the screen. Offscreen graphics worlds are available on all Macintosh computers that support System 7.

You can use all of the drawing operations described in the chapters "QuickDraw Drawing" and "Color QuickDraw" in this book to create images in an offscreen graphics world. After preparing an image in an offscreen graphics world, you can use the CopyBits, CopyMask, or CopyDeepMask procedure to move the image to an onscreen color graphics port or basic graphics port. Color graphics ports are described in the chapter "Color QuickDraw," and basic graphics ports are described in the chapter "Basic QuickDraw" in this book.

To support your application in preparing an offscreen image for display on a screen, Color QuickDraw by default uses the screen's GDevice record to define the pixel depth and color table for the offscreen graphics world. The GDevice record is described in the chapter "Graphics Devices" in this book.

Your application can treat an offscreen graphics world as a virtual screen where your application has complete control over its drawing environment, and on which your application can draw a complex image where the user can't see the various steps your application must take before completing it. For example, your application can use QuickDraw drawing routines to build a complex color image in an offscreen graphics world; then, after building the image, your application can use CopyBits to copy it quickly to the screen. This prevents the choppiness that could occur if your application were to construct the image directly in a color graphics port on the screen.


Chapter Contents
About Offscreen Graphics Worlds
Using Offscreen Graphics Worlds
Creating an Offscreen Graphics World
Setting the Graphics Port for an Offscreen Graphics World
Drawing Into an Offscreen Graphics World
Copying an Offscreen Image Into a Window
Updating an Offscreen Graphics World
Creating a Mask and a Source Image in Offscreen Graphics Worlds
Offscreen Graphics Worlds Reference
Data Structures
Routines
Creating, Altering, and Disposing of Offscreen Graphics Worlds
Saving and Restoring Graphics Ports and Offscreen Graphics Worlds
Managing an Offscreen Graphics World's Pixel Image
Summary of Offscreen Graphics Worlds
Pascal Summary
Constants
Data Types
Routines
C Summary
Constants
Data Types
Functions
Assembly-Language Summary
Trap Macros Requiring Routine Selectors
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help