Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /

Chapter 5 - Graphics Devices

This chapter describes how Color QuickDraw manages video devices so that your application can draw to a window's graphics port without regard to the capabilities of the screen--even if the window spans more than one screen.

Read this chapter to learn how Color QuickDraw communicates with a video
device--such as a plug-in video card or a built-in video interface--by automatically creating and managing a record of data type GDevice. Your application generally never needs to create GDevice records. However, your application may find it useful to examine GDevice records to determine the capabilities of the user's screens. When zooming a window, for example, your application can use GDevice records to determine which screen contains the largest area of a window, and then determine the ideal window size for that screen. You may also wish to use the DeviceLoop procedure, described in this chapter, if you want to optimize your application's drawing for screens with different capabilities.

This chapter describes the GDevice record and the routines that Color QuickDraw uses to create and manage such records. This chapter also describes routines that your application might find helpful for determining screen characteristics. For many applications, QuickDraw provides a device-independent interface; as described in other chapters of this book, your application can draw images in a graphics port for a window, and Color QuickDraw automatically manages the path to the screen--even if the user has multiple screens. However, if your application needs more control over how it draws images on screens of various sizes and with different capabilities, your application can use the routines described in this chapter.

Chapter Contents
About Graphics Devices
Using Graphics Devices
Optimizing Your Images for Different Graphics Devices
Zooming Windows on Multiscreen Systems
Setting a Device's Pixel Depth
Exceptional Cases When Working With Color Devices
Graphics Devices Reference
Data Structures
Routines for Graphics Devices
Creating, Setting, and Disposing of GDevice Records
Getting the Available Graphics Devices
Determining the Characteristics of a Video Device
Changing the Pixel Depth for a Video Device
Application-Defined Routine
The Screen Resource
Summary of Graphics Devices
Pascal Summary
Data Types
Routines for Graphics Devices
Application-Defined Routine
C Summary
Data Types
Functions for Graphics Devices
Application-Defined Function
Assembly-Language Summary
Data Structure
Global Variables

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996