QuickDraw Reference
PDF
Overview
Functions by Task
Drawing QuickDraw Pictures in a Quartz Context
Using Quartz 2D to Draw in a Graphics Port
Other Quartz-Related Functions in QuickDraw
Calculating Black-and-White Fills
Calculating Color Fills
Changing Black-and-White Cursors
Changing Color Cursors
Changing the Background Bit Pattern
Changing the Background Pixel Pattern
Compressing and Decompressing Data
Converting Between Angle and Slope Values
Copying Images
Creating, Altering, and Disposing of Offscreen Graphics Worlds
Creating and Disposing of Color Tables
Creating and Disposing of Pictures
Creating and Disposing of Pixel Patterns
Creating and Managing Polygons
Creating and Managing Rectangles
Creating and Managing Regions
Creating, Setting, and Disposing of GDevice Records
Creating, Setting, and Disposing of Pixel Maps
Customizing Color QuickDraw Operations
Customizing QuickDraw Operations
Determining Current Colors and Best Intermediate Colors
Determining the Characteristics of a Video Device
Determining Whether QuickDraw Has Finished Drawing
Drawing Arcs and Wedges
Drawing Lines
Drawing Ovals
Drawing Pictures
Drawing Polygons
Drawing Rectangles
Drawing Regions
Drawing Rounded Rectangles
Drawing With Color QuickDraw Colors
Drawing With the Eight-Color System
Getting Pattern Resources
Getting the Available Graphics Devices
Hiding and Showing Cursors
Managing a Color Graphics Pen
Managing an Offscreen Graphics World’s Pixel Image
Managing Bitmaps, Port Rectangles, and Clipping Regions
Managing Color Tables
Managing Colors
Managing the Graphics Pen
Manipulating Points in Graphics Ports
Obtaining a Pseudorandom Number
Operations on Search and Complement Functions
Reporting Data Structure Changes to QuickDraw
Retrieving Color QuickDraw Result Codes
Saving and Restoring Graphics Ports
Saving and Restoring Graphics Ports and Offscreen Graphics Worlds
Scaling and Mapping Points, Rectangles, Polygons, and Regions
Miscellaneous
Functions
AddPt
AngleFromSlope
CopyRgn
DiffRgn
DisposeRgn
EmptyRect
EmptyRgn
EqualPt
EqualRect
EqualRgn
GetClip
GetGWorld
GetPixBaseAddr
GetRegionBounds
HandleToRgn
HideCursor
InitCursor
InsetRect
InsetRgn
IsRegionRectangular
IsValidRgnHandle
MapPt
MapRect
MapRgn
NewGWorld
NewRgn
ObscureCursor
OffsetRect
OffsetRgn
Pt2Rect
PtInRect
PtInRgn
PtToAngle
QDBeginCGContext
QDEndCGContext
QDGetCGDirectDisplayID
QDPictCreateWithProvider
QDPictCreateWithURL
QDPictDrawToCGContext
QDPictGetBounds
QDPictGetResolution
QDPictRelease
QDPictRetain
QDRegionToRects
RectInRgn
RectRgn
RgnToHandle
ScalePt
SectRect
SectRgn
SetClip
SetEmptyRgn
SetGWorld
SetPt
SetRect
SetRectRgn
ShieldCursor
ShowCursor
SlopeFromAngle
SubPt
UnionRect
UnionRgn
XorRgn
Callbacks
ColorComplementProcPtr
ColorSearchProcPtr
CustomXFerProcPtr
DeviceLoopDrawingProcPtr
DragGrayRgnProcPtr
QDArcProcPtr
QDBitsProcPtr
QDCommentProcPtr
QDGetPicProcPtr
QDJShieldCursorProcPtr
QDLineProcPtr
QDOpcodeProcPtr
QDOvalProcPtr
QDPolyProcPtr
QDPrinterStatusProcPtr
QDPutPicProcPtr
QDRectProcPtr
QDRgnProcPtr
QDRRectProcPtr
QDStdGlyphsProcPtr
QDTextProcPtr
QDTxMeasProcPtr
RegionToRectsProcPtr
Data Types
BitMap
Bits16
CCrsr
CGrafPort
CGrafPtr
ColorComplementUPP
ColorSearchUPP
ColorSpec
ColorTable
ConstPatternParam
CProcRec
CQDProcs
CSpecArray
Cursor
CursorImageRec
CursorInfo
CustomXFerRec
CWindowPtr
DeviceLoopDrawingUPP
DeviceLoopFlags
DialogPtr
DragConstraint
DragGrayRgnUPP
GammaTbl
GDevice
GrafPort
GrafPtr
GrafVars
GrafVerb
GWorldFlags
GWorldPtr
ITab
MacPolygon
MacRegion
MatchRec
OpenCPicParams
Pattern
PenState
Picture
PixelType
PixMap
PixPat
Polygon
PrinterFontStatus
PrinterScalingStatus
PrinterStatusOpcode
QDArcUPP
QDBitsUPP
QDByte
QDCommentUPP
QDErr
QDGetPicUPP
QDGlobals
QDJShieldCursorUPP
QDLineUPP
QDOpcodeUPP
QDOvalUPP
QDPictRef
QDPolyUPP
QDPrinterStatusUPP
QDProcs
QDPutPicUPP
QDRectUPP
QDRegionBitsRef
QDRegionParseDirection
QDRgnUPP
QDRRectUPP
QDStdGlyphsUPP
QDTextUPP
QDTxMeasUPP
RegionToRectsUPP
ReqListRec
RGBColor
RgnHandle
SProcRec
WindowPtr
xColorSpec
xCSpecArray
Constants
chunky
Color Constants
colorXorXFer
Cursor ID Constants
cursorDoesAnimate
Device Attribute Constants
Device Loop Flags
deviceIsIndirect
Drag Constraint Constants
Graphics Device Type Constants
Graphics World Flags
invalColReq
italicBit
Pixel Formats
k1MonochromePixelFormat
kCursorComponentInit
kCursorComponentsVersion
kCursorComponentType
kCursorImageMajorVersion
kPrinterFontStatus
kQDGrafVerbFrame
kQDParseRegionFromTop
kQDRegionToRectsMsgInit
kQDUseDefaultTextRendering
kRenderCursorInHardware
kXFer1PixelAtATime
normalBit
pixPurgeBit
singleDevicesBit
Source, Pattern, and Arithmetic Transfer Mode Constants
Verb Constants
Result Codes
Appendix A: Deprecated QuickDraw Functions
Deprecated in Mac OS X v10.4
AddComp
AddSearch
AllocCursor
AllowPurgePixels
BackColor
BackPat
BackPixPat
BitMapToRegion
CalcCMask
CalcMask
ClipCGContextToRegion
ClipRect
CloseCursorComponent
ClosePicture
ClosePoly
CloseRgn
Color2Index
ColorBit
CopyBits
CopyDeepMask
CopyMask
CopyPixMap
CopyPixPat
CreateCGContextForPort
CreateNewPort
CreateNewPortForCGDisplayID
CTabChanged
CursorComponentChanged
CursorComponentSetData
DelComp
DelSearch
DeltaPoint
deltapoint
DeviceLoop
DisposeCCursor
DisposeColorComplementUPP
DisposeColorSearchUPP
DisposeCTable
DisposeDeviceLoopDrawingUPP
DisposeDragGrayRgnUPP
DisposeGDevice
DisposeGWorld
DisposePixMap
DisposePixPat
DisposePort
DisposeQDArcUPP
DisposeQDBitsUPP
DisposeQDCommentUPP
DisposeQDGetPicUPP
DisposeQDJShieldCursorUPP
DisposeQDLineUPP
DisposeQDOpcodeUPP
DisposeQDOvalUPP
DisposeQDPolyUPP
DisposeQDPutPicUPP
DisposeQDRectUPP
DisposeQDRgnUPP
DisposeQDRRectUPP
DisposeQDStdGlyphsUPP
DisposeQDTextUPP
DisposeQDTxMeasUPP
DisposeRegionToRectsUPP
DisposeScreenBuffer
DrawPicture
EraseArc
EraseOval
ErasePoly
EraseRect
EraseRgn
EraseRoundRect
FillArc
FillCArc
FillCOval
FillCPoly
FillCRect
FillCRgn
FillCRoundRect
FillOval
FillPoly
FillRect
FillRgn
FillRoundRect
ForeColor
FrameArc
FrameOval
FramePoly
FrameRect
FrameRgn
FrameRoundRect
GDeviceChanged
GetBackColor
GetCCursor
GetCPixel
GetCTable
GetCTSeed
GetCursor
GetDeviceList
GetForeColor
GetGDevice
GetGWorldDevice
GetGWorldPixMap
GetIndPattern
GetMainDevice
GetMaskTable
GetMaxDevice
GetNextDevice
GetPattern
GetPen
GetPenState
GetPicture
GetPixBounds
GetPixDepth
GetPixel
GetPixelsState
GetPixPat
GetPixRowBytes
GetPort
GetPortBackColor
GetPortBackPixPat
GetPortBitMapForCopyBits
GetPortBounds
GetPortChExtra
GetPortClipRegion
GetPortCustomXFerProc
GetPortFillPixPat
GetPortForeColor
GetPortFracHPenLocation
GetPortGrafProcs
GetPortHiliteColor
GetPortOpColor
GetPortPenLocation
GetPortPenMode
GetPortPenPixPat
GetPortPenSize
GetPortPenVisibility
GetPortPixMap
GetPortSpExtra
GetPortTextFace
GetPortTextFont
GetPortTextMode
GetPortTextSize
GetPortVisibleRegion
GetQDGlobalsArrow
GetQDGlobalsBlack
GetQDGlobalsDarkGray
GetQDGlobalsGray
GetQDGlobalsLightGray
GetQDGlobalsRandomSeed
GetQDGlobalsScreenBits
GetQDGlobalsThePort
GetQDGlobalsWhite
GetSubTable
GlobalToLocal
GrafDevice
HidePen
HiliteColor
Index2Color
InitGDevice
InvertArc
InvertColor
InvertOval
InvertPoly
InvertRect
InvertRgn
InvertRoundRect
InvokeColorComplementUPP
InvokeColorSearchUPP
InvokeDeviceLoopDrawingUPP
InvokeDragGrayRgnUPP
InvokeQDArcUPP
InvokeQDBitsUPP
InvokeQDCommentUPP
InvokeQDGetPicUPP
InvokeQDJShieldCursorUPP
InvokeQDLineUPP
InvokeQDOpcodeUPP
InvokeQDOvalUPP
InvokeQDPolyUPP
InvokeQDPutPicUPP
InvokeQDRectUPP
InvokeQDRgnUPP
InvokeQDRRectUPP
InvokeQDStdGlyphsUPP
InvokeQDTextUPP
InvokeQDTxMeasUPP
InvokeRegionToRectsUPP
IsPortClipRegionEmpty
IsPortColor
IsPortOffscreen
IsPortPictureBeingDefined
IsPortPolyBeingDefined
IsPortRegionBeingDefined
IsPortVisibleRegionEmpty
IsValidPort
KillPicture
KillPoly
Line
LineTo
LMGetCursorNew
LMGetDeviceList
LMGetFractEnable
LMGetHiliteMode
LMGetHiliteRGB
LMGetLastFOND
LMGetLastSPExtra
LMGetMainDevice
LMGetQDColors
LMGetScrHRes
LMGetScrVRes
LMGetTheGDevice
LMGetWidthListHand
LMGetWidthPtr
LMGetWidthTabHandle
LMSetCursorNew
LMSetDeviceList
LMSetFractEnable
LMSetHiliteMode
LMSetHiliteRGB
LMSetLastFOND
LMSetLastSPExtra
LMSetMainDevice
LMSetQDColors
LMSetScrHRes
LMSetScrVRes
LMSetTheGDevice
LMSetWidthListHand
LMSetWidthPtr
LMSetWidthTabHandle
LocalToGlobal
LockPixels
LockPortBits
MakeITable
MakeRGBPat
MapPoly
Move
MovePortTo
MoveTo
NewColorComplementUPP
NewColorSearchUPP
NewDeviceLoopDrawingUPP
NewDragGrayRgnUPP
NewGDevice
NewGWorldFromPtr
NewPixMap
NewPixPat
NewQDArcUPP
NewQDBitsUPP
NewQDCommentUPP
NewQDGetPicUPP
NewQDJShieldCursorUPP
NewQDLineUPP
NewQDOpcodeUPP
NewQDOvalUPP
NewQDPolyUPP
NewQDPutPicUPP
NewQDRectUPP
NewQDRgnUPP
NewQDRRectUPP
NewQDStdGlyphsUPP
NewQDTextUPP
NewQDTxMeasUPP
NewRegionToRectsUPP
NewScreenBuffer
NewTempScreenBuffer
NoPurgePixels
OffscreenVersion
OffsetPoly
OpColor
OpenCPicture
OpenCursorComponent
OpenPicture
OpenPoly
OpenRgn
PackBits
PaintArc
PaintOval
PaintPoly
PaintRect
PaintRgn
PaintRoundRect
PenMode
PenNormal
PenPat
PenPixPat
PenSize
PicComment
PixMap32Bit
PixPatChanged
PortChanged
PortSize
ProtectEntry
QDAddRectToDirtyRegion
QDAddRegionToDirtyRegion
QDDisplayWaitCursor
QDDisposeRegionBits
QDDone
QDError
QDFlushPortBuffer
QDGetCursorData
QDGetDirtyRegion
QDGetPatternOrigin
QDGetPictureBounds
QDGlobalToLocalPoint
QDGlobalToLocalRect
QDGlobalToLocalRegion
QDIsNamedPixMapCursorRegistered
QDIsPortBufferDirty
QDIsPortBuffered
QDLocalToGlobalPoint
QDLocalToGlobalRect
QDLocalToGlobalRegion
QDRegisterNamedPixMapCursor
QDRestoreRegionBits
QDSaveRegionBits
QDSetCursorScale
QDSetDirtyRegion
QDSetNamedPixMapCursor
QDSetPatternOrigin
QDSwapPort
QDSwapPortTextFlags
QDSwapTextFlags
QDUnregisterNamedPixMapCursor
Random
RealColor
ReserveEntry
RestoreEntries
RGBBackColor
RGBForeColor
SaveEntries
ScreenRes
ScrollRect
SectRegionWithPortClipRegion
SectRegionWithPortVisibleRegion
SeedCFill
SeedFill
SetCCursor
SetClientID
SetCPixel
SetCursor
SetCursorComponent
SetDeviceAttribute
SetEntries
SetGDevice
SetOrigin
SetPenState
SetPixelsState
SetPort
SetPortBackPixPat
SetPortBits
SetPortBounds
SetPortClipRegion
SetPortCustomXFerProc
SetPortFillPixPat
SetPortFracHPenLocation
SetPortGrafProcs
SetPortOpColor
SetPortPenMode
SetPortPenPixPat
SetPortPenSize
SetPortPix
SetPortTextFace
SetPortTextFont
SetPortTextMode
SetPortTextSize
SetPortVisibleRegion
SetQDError
SetQDGlobalsArrow
SetQDGlobalsRandomSeed
SetStdCProcs
SetStdProcs
ShowPen
StdArc
StdBits
StdComment
StdGetPic
StdLine
StdOpcode
StdOval
StdPoly
StdPutPic
StdRect
StdRgn
StdRRect
StuffHex
SwapPortPicSaveHandle
SwapPortPolySaveHandle
SwapPortRegionSaveHandle
SyncCGContextOriginWithPort
TestDeviceAttribute
UnlockPixels
UnlockPortBits
UnpackBits
UpdateGWorld
Revision History
Index
Companion Guide
Quartz Programming Guide for QuickDraw Developers