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 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines


Customizing QuickDraw Operations

For each shape that QuickDraw can draw, there are procedures that perform these basic graphics operations on the shape: frame, paint, erase, invert, and fill. Those procedures in turn call a low-level drawing routine for the shape. For example, the FrameOval, PaintOval, EraseOval, InvertOval, and FillOval procedures all call the low-level procedure StdOval, which draws the oval.

Other low-level routines defined by QuickDraw are:

For each type of object QuickDraw can draw, including text and lines, there's a pointer to one of these low-level routines.

The grafProcs field of a GrafPort or CGrafPort record determines which low-level routines are called. If that field contains the value of NIL, the standard routines are called. You can set the grafProcs field to point to a record of pointers to your own routines. For a basic graphics port, this record of pointers is defined by a QDProcs record. As described in the chapter "Color QuickDraw," these pointers are contained
in a CQDProcs record for a color graphics port. By changing these pointers, you can install your own routines, and either completely override the standard ones or call them after your routines have modified their parameters as necessary.

To assist you in setting up a record, basic QuickDraw provides the SetStdProcs procedure, which is described in the next section. You can use the SetStdProcs procedure to get a QDProcs record with fields that point to basic QuickDraw's standard low-level routines. You can then reset the routines with which you are concerned. By pointing to your modified QDProcs record in the grafProcs field of a GrafPort record, you can replace some or all of basic QuickDraw's standard low-level routines.

The standard QuickDraw low-level routines are described in the rest of this section. These low-level routines should be called only from your customized routines.


Subtopics
SetStdProcs
StdText
StdLine
StdRect
StdRRect
StdOval
StdArc
StdPoly
StdRgn
StdBits
StdComment
StdTxtMeas
StdGetPic
StdPutPic

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996