Important: The information in this document is obsolete and should not be used for new development.
Chapter 1 - Introduction to QuickDrawThis chapter introduces you to the terms, concepts, and capabilities of QuickDraw, a collection of system software routines that your application can use to perform most image-manipulation operations on Macintosh computers. This chapter also introduces you to the Printing Manager, which your application can use to print the images you create with QuickDraw.
Imaging entails the construction and display of graphical information. Such graphical information can consist of shapes, pictures, and text, and can be displayed on such output devices as screens and printers. You should read this chapter if you are new to Macintosh programming. The topics introduced in this chapter are explained in detail in the rest of the chapters of this book. However, for information on QuickDraw's text-handling facilities, you should instead see Inside Macintosh: Text.
Macintosh system software not only provides enormous imaging flexibility, it also handles much of the programming overhead that such flexibility requires. For example, Color QuickDraw automatically handles multiple screens of differing sizes and capabilities, so that most applications don't need to determine where the user has placed a window or what equipment the user has set up.
This rest of this chapter introduces
QuickDraw is the part of the Macintosh Toolbox that performs graphics operations on the user's screen. All Macintosh applications use QuickDraw indirectly whenever they call other Toolbox managers to create and manage the basic user interface elements (such as windows, controls, and menus, as described in Inside Macintosh: Macintosh Toolbox Essentials).
- basic QuickDraw, the imaging engine for all Macintosh computers
- Color QuickDraw, the color imaging system with which your application can display hundreds, thousands, even millions of colors on grayscale and color screens
- the Printing Manager, the collection of system software routines that allows your application to communicate with printer drivers to print on any variety of printer
- other imaging managers associated with QuickDraw
As the Macintosh has evolved toward greater graphics capabilities, QuickDraw has grown along with it. Each new generation of QuickDraw has maintained compatibility with those that preceded it, while adding new capabilities and expanding the range of possible display devices. This evolutionary approach has helped to ensure that existing applications, written for earlier Macintosh models, continue to work as more powerful computers are developed.
The development of QuickDraw has progressed along these three main evolutionary stages:
Applications that use only basic QuickDraw routines are compatible with all Macintosh systems. However, applications that use routines specific to Color QuickDraw cannot run on computers supporting only basic QuickDraw.
- Basic QuickDraw, which was designed for the earliest Macintosh models with their built-in black-and-white screens. System 7 added new capabilities to basic QuickDraw, including support for offscreen graphics worlds and the extended version 2 picture format. Basic QuickDraw is still used in more recent black-and-white Macintosh systems such as the Macintosh Classic
\xC6 and PowerBook 100 computers.
- The original version of Color QuickDraw, which was introduced with the first Macintosh II systems. This first generation of Color QuickDraw could support up to 256 colors.
- The current version of Color QuickDraw, which was originally introduced as 32-Bit Color QuickDraw and is now part of System 7. This version has been expanded to support up to millions of colors.
- Drawing Environments
- QuickDraw's Coordinate Plane
- Indexed Colors
- Direct Colors
- Multiple Screens
- From Memory Bits to Onscreen Pixels
- From Memory Bits to Printers
- Other Graphics Managers