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 2 - Basic QuickDraw

This chapter describes how to initialize basic QuickDraw and how to create and manage a basic graphics port--the drawing environment in which your application can create graphics and text in either black and white or eight basic colors. Many of the routines described in this chapter also operate in color graphics ports, and are noted as such. This chapter also describes the mathematical foundation of both basic QuickDraw and Color QuickDraw.

Read this chapter to learn how to set up a drawing environment for your application on all models of Macintosh computers. The chapter "Color QuickDraw" in this book describes additional data structures and routines necessary for preparing the more sophisticated color drawing environments that are supported on the more powerful Macintosh computers.

If your application ever draws to the screen, it uses basic QuickDraw--either directly, as when it draws shapes or patterns into a window, or indirectly, as when it uses another Macintosh Toolbox manager (such as the Window Manager or Menu Manager) to implement elements of the standard Macintosh user interface. If your application does not use color, or uses only a few colors, you may find that all the tools you need for preparing a graphics environment are provided by basic QuickDraw. Once you prepare a basic drawing environment as described in this chapter, you can begin drawing into it as described in the next chapter, "QuickDraw Drawing."


Chapter Contents
About Basic QuickDraw
The Mathematical Foundations of QuickDraw
The Coordinate Plane
Points
Rectangles
Regions
The Black-and-White Drawing Environment: Basic Graphics Ports
Bitmaps
The Graphics Port Drawing Area
Graphics Port Bit Patterns
The Graphics Pen
Text in a Graphics Port
The Limited Colors of a Basic Graphics Port
Other Fields
Using Basic QuickDraw
Initializing Basic QuickDraw
Creating Basic Graphics Ports
Setting the Graphics Port
Switching Between Global and Local Coordinate Systems
Scrolling the Pixels in the Port Rectangle
Basic QuickDraw Reference
Data Structures
Routines
Initializing QuickDraw
Opening and Closing Basic Graphics Ports
Saving and Restoring Graphics Ports
Managing Bitmaps, Port Rectangles, and Clipping Regions
Manipulating Points in Graphics Ports
Summary of Basic QuickDraw
Pascal Summary
Data Types
Routines
C Summary
Data Types
Functions
Assembly-Language Summary
Data Structures
Global Variables
Result Codes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996