Mac OS 9
Quickdraw.h File Reference

Interface to Quickdraw Graphics. More...

#include <Components.h>
#include <MacTypes.h>
#include <MixedMode.h>
#include <QuickdrawText.h>
#include <CGContext.h>
#include <Quickdraw.h>
#include <Memory.h>

Go to the source code of this file.

Data Structures

struct  Pattern
 
struct  PrinterFontStatus
 
struct  PrinterScalingStatus
 
struct  BitMap
 
struct  Cursor
 
struct  PenState
 
struct  MacRegion
 
struct  Picture
 
struct  MacPolygon
 
struct  QDProcs
 
struct  GrafPort
 
struct  RGBColor
 
struct  ColorSpec
 
struct  ColorTable
 
struct  xColorSpec
 
struct  MatchRec
 
struct  PixMap
 
struct  PixPat
 
struct  CCrsr
 
struct  GammaTbl
 
struct  ITab
 
struct  SProcRec
 
struct  CProcRec
 
struct  GDevice
 
struct  GrafVars
 
struct  CQDProcs
 
struct  CGrafPort
 
struct  ReqListRec
 
struct  OpenCPicParams
 
struct  CursorImageRec
 
struct  QDGlobals
 
struct  CustomXFerRec
 
struct  CursorInfo
 

Macros

#define NewQDTextUPP(userRoutine)
 
#define NewQDLineUPP(userRoutine)
 
#define NewQDRectUPP(userRoutine)
 
#define NewQDRRectUPP(userRoutine)
 
#define NewQDOvalUPP(userRoutine)
 
#define NewQDArcUPP(userRoutine)
 
#define NewQDPolyUPP(userRoutine)
 
#define NewQDRgnUPP(userRoutine)
 
#define NewQDBitsUPP(userRoutine)
 
#define NewQDCommentUPP(userRoutine)
 
#define NewQDTxMeasUPP(userRoutine)
 
#define NewQDGetPicUPP(userRoutine)
 
#define NewQDPutPicUPP(userRoutine)
 
#define NewQDOpcodeUPP(userRoutine)
 
#define NewQDStdGlyphsUPP(userRoutine)
 
#define NewQDJShieldCursorUPP(userRoutine)
 
#define DisposeQDTextUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDLineUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDRectUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDRRectUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDOvalUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDArcUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDPolyUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDRgnUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDBitsUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDCommentUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDTxMeasUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDGetPicUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDPutPicUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDOpcodeUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDStdGlyphsUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeQDJShieldCursorUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeQDTextUPP(byteCount, textBuf, numer, denom, userUPP)
 
#define InvokeQDLineUPP(newPt, userUPP)    CALL_ONE_PARAMETER_UPP((userUPP), uppQDLineProcInfo, (newPt))
 
#define InvokeQDRectUPP(verb, r, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDRectProcInfo, (verb), (r))
 
#define InvokeQDRRectUPP(verb, r, ovalWidth, ovalHeight, userUPP)
 
#define InvokeQDOvalUPP(verb, r, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDOvalProcInfo, (verb), (r))
 
#define InvokeQDArcUPP(verb, r, startAngle, arcAngle, userUPP)
 
#define InvokeQDPolyUPP(verb, poly, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDPolyProcInfo, (verb), (poly))
 
#define InvokeQDRgnUPP(verb, rgn, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDRgnProcInfo, (verb), (rgn))
 
#define InvokeQDBitsUPP(srcBits, srcRect, dstRect, mode, maskRgn, userUPP)
 
#define InvokeQDCommentUPP(kind, dataSize, dataHandle, userUPP)
 
#define InvokeQDTxMeasUPP(byteCount, textAddr, numer, denom, info, userUPP)
 
#define InvokeQDGetPicUPP(dataPtr, byteCount, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDGetPicProcInfo, (dataPtr), (byteCount))
 
#define InvokeQDPutPicUPP(dataPtr, byteCount, userUPP)    CALL_TWO_PARAMETER_UPP((userUPP), uppQDPutPicProcInfo, (dataPtr), (byteCount))
 
#define InvokeQDOpcodeUPP(fromRect, toRect, opcode, version, userUPP)
 
#define InvokeQDStdGlyphsUPP(dataStream, size, userUPP)
 
#define InvokeQDJShieldCursorUPP(left, top, right, bottom, userUPP)
 
#define NewQDTextProc(userRoutine)   NewQDTextUPP(userRoutine)
 
#define NewQDLineProc(userRoutine)   NewQDLineUPP(userRoutine)
 
#define NewQDRectProc(userRoutine)   NewQDRectUPP(userRoutine)
 
#define NewQDRRectProc(userRoutine)   NewQDRRectUPP(userRoutine)
 
#define NewQDOvalProc(userRoutine)   NewQDOvalUPP(userRoutine)
 
#define NewQDArcProc(userRoutine)   NewQDArcUPP(userRoutine)
 
#define NewQDPolyProc(userRoutine)   NewQDPolyUPP(userRoutine)
 
#define NewQDRgnProc(userRoutine)   NewQDRgnUPP(userRoutine)
 
#define NewQDBitsProc(userRoutine)   NewQDBitsUPP(userRoutine)
 
#define NewQDCommentProc(userRoutine)   NewQDCommentUPP(userRoutine)
 
#define NewQDTxMeasProc(userRoutine)   NewQDTxMeasUPP(userRoutine)
 
#define NewQDGetPicProc(userRoutine)   NewQDGetPicUPP(userRoutine)
 
#define NewQDPutPicProc(userRoutine)   NewQDPutPicUPP(userRoutine)
 
#define NewQDOpcodeProc(userRoutine)   NewQDOpcodeUPP(userRoutine)
 
#define NewQDStdGlyphsProc(userRoutine)   NewQDStdGlyphsUPP(userRoutine)
 
#define NewQDJShieldCursorProc(userRoutine)   NewQDJShieldCursorUPP(userRoutine)
 
#define CallQDTextProc(userRoutine, byteCount, textBuf, numer, denom)    InvokeQDTextUPP(byteCount, textBuf, numer, denom, userRoutine)
 
#define CallQDLineProc(userRoutine, newPt)   InvokeQDLineUPP(newPt, userRoutine)
 
#define CallQDRectProc(userRoutine, verb, r)    InvokeQDRectUPP(verb, r, userRoutine)
 
#define CallQDRRectProc(userRoutine, verb, r, ovalWidth, ovalHeight)    InvokeQDRRectUPP(verb, r, ovalWidth, ovalHeight, userRoutine)
 
#define CallQDOvalProc(userRoutine, verb, r)    InvokeQDOvalUPP(verb, r, userRoutine)
 
#define CallQDArcProc(userRoutine, verb, r, startAngle, arcAngle)    InvokeQDArcUPP(verb, r, startAngle, arcAngle, userRoutine)
 
#define CallQDPolyProc(userRoutine, verb, poly)    InvokeQDPolyUPP(verb, poly, userRoutine)
 
#define CallQDRgnProc(userRoutine, verb, rgn)    InvokeQDRgnUPP(verb, rgn, userRoutine)
 
#define CallQDBitsProc(userRoutine, srcBits, srcRect, dstRect, mode, maskRgn)    InvokeQDBitsUPP(srcBits, srcRect, dstRect, mode, maskRgn, userRoutine)
 
#define CallQDCommentProc(userRoutine, kind, dataSize, dataHandle)    InvokeQDCommentUPP(kind, dataSize, dataHandle, userRoutine)
 
#define CallQDTxMeasProc(userRoutine, byteCount, textAddr, numer, denom, info)    InvokeQDTxMeasUPP(byteCount, textAddr, numer, denom, info, userRoutine)
 
#define CallQDGetPicProc(userRoutine, dataPtr, byteCount)    InvokeQDGetPicUPP(dataPtr, byteCount, userRoutine)
 
#define CallQDPutPicProc(userRoutine, dataPtr, byteCount)    InvokeQDPutPicUPP(dataPtr, byteCount, userRoutine)
 
#define CallQDOpcodeProc(userRoutine, fromRect, toRect, opcode, version)    InvokeQDOpcodeUPP(fromRect, toRect, opcode, version, userRoutine)
 
#define CallQDStdGlyphsProc(userRoutine, dataStream, size)    InvokeQDStdGlyphsUPP(dataStream, size, userRoutine)
 
#define CallQDJShieldCursorProc(userRoutine, left, top, right, bottom)    InvokeQDJShieldCursorUPP(left, top, right, bottom, userRoutine)
 
#define NewDragGrayRgnUPP(userRoutine)
 
#define NewColorSearchUPP(userRoutine)
 
#define NewColorComplementUPP(userRoutine)
 
#define DisposeDragGrayRgnUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeColorSearchUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeColorComplementUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeDragGrayRgnUPP(userUPP)    CALL_ZERO_PARAMETER_UPP((userUPP), uppDragGrayRgnProcInfo)
 
#define InvokeColorSearchUPP(rgb, position, userUPP)
 
#define InvokeColorComplementUPP(rgb, userUPP)    (Boolean) CALL_ONE_PARAMETER_UPP((userUPP), uppColorComplementProcInfo, (rgb))
 
#define NewDragGrayRgnProc(userRoutine)   NewDragGrayRgnUPP(userRoutine)
 
#define NewColorSearchProc(userRoutine)   NewColorSearchUPP(userRoutine)
 
#define NewColorComplementProc(userRoutine)   NewColorComplementUPP(userRoutine)
 
#define CallDragGrayRgnProc(userRoutine)   InvokeDragGrayRgnUPP(userRoutine)
 
#define CallColorSearchProc(userRoutine, rgb, position)    InvokeColorSearchUPP(rgb, position, userRoutine)
 
#define CallColorComplementProc(userRoutine, rgb)    InvokeColorComplementUPP(rgb, userRoutine)
 
#define OLDPIXMAPSTRUCT   0
 
#define GETPIXMAPPIXELFORMAT(pm)    (((pm)->pixelFormat != 0) ? (pm)->pixelFormat : (pm)->pixelSize)
 
#define NON_MAC_PIXEL_FORMATS   1
 
#define OLDGDEVICESTRUCT   0
 
#define NewQDPrinterStatusUPP(userRoutine)
 
#define NewDeviceLoopDrawingUPP(userRoutine)
 
#define DisposeQDPrinterStatusUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeDeviceLoopDrawingUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeQDPrinterStatusUPP(opcode, currentPort, printerStatus, userUPP)
 
#define InvokeDeviceLoopDrawingUPP(depth, deviceFlags, targetDevice, userData, userUPP)
 
#define NewQDPrinterStatusProc(userRoutine)   NewQDPrinterStatusUPP(userRoutine)
 
#define NewDeviceLoopDrawingProc(userRoutine)    NewDeviceLoopDrawingUPP(userRoutine)
 
#define CallQDPrinterStatusProc(userRoutine, opcode, currentPort, printerStatus)    InvokeQDPrinterStatusUPP(opcode, currentPort, printerStatus, userRoutine)
 
#define CallDeviceLoopDrawingProc(userRoutine, depth, deviceFlags, targetDevice, userData)
 
#define NewRegionToRectsUPP(userRoutine)
 
#define DisposeRegionToRectsUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeRegionToRectsUPP(message, rgn, rect, refCon, userUPP)
 
#define NewRegionToRectsProc(userRoutine)   NewRegionToRectsUPP(userRoutine)
 
#define CallRegionToRectsProc(userRoutine, message, rgn, rect, refCon)    InvokeRegionToRectsUPP(message, rgn, rect, refCon, userRoutine)
 

Typedefs

typedef SInt8 GrafVerb
 
typedef SInt8 PixelType
 
typedef short Bits16[16]
 
typedef struct Pattern Pattern
 
typedef const PatternConstPatternParam
 
typedef PatternPatPtr
 
typedef PatPtrPatHandle
 
typedef SignedByte QDByte
 
typedef QDByte * QDPtr
 
typedef QDPtr * QDHandle
 
typedef short QDErr
 
typedef unsigned long DeviceLoopFlags
 
typedef SInt32 PrinterStatusOpcode
 
typedef struct PrinterFontStatus PrinterFontStatus
 
typedef struct PrinterScalingStatus PrinterScalingStatus
 
typedef struct BitMap BitMap
 
typedef BitMapBitMapPtr
 
typedef BitMapPtrBitMapHandle
 
typedef struct Cursor Cursor
 
typedef CursorCursPtr
 
typedef CursPtrCursHandle
 
typedef struct PenState PenState
 
typedef struct MacRegion MacRegion
 
typedef MacRegionRgnPtr
 
typedef RgnPtrRgnHandle
 
typedef struct Picture Picture
 
typedef PicturePicPtr
 
typedef PicPtrPicHandle
 
typedef struct MacPolygon MacPolygon
 
typedef MacPolygonPolyPtr
 
typedef PolyPtrPolyHandle
 
typedef const void * textBuf
 
typedef const void Point numer
 
typedef const void Point Point denom
 
typedef const Rectr
 
typedef const Rect short ovalWidth
 
typedef const Rect short short ovalHeight
 
typedef const Rect short startAngle
 
typedef const Rect short short arcAngle
 
typedef PolyHandle poly
 
typedef RgnHandle rgn
 
typedef const RectsrcRect
 
typedef const Rect const RectdstRect
 
typedef const Rect const Rect short mode
 
typedef const Rect const Rect short RgnHandle maskRgn
 
typedef short dataSize
 
typedef short Handle dataHandle
 
typedef const void * textAddr
 
typedef const void Point Point FontInfoinfo
 
typedef short byteCount
 
typedef const RecttoRect
 
typedef const Rect UInt16 opcode
 
typedef const Rect UInt16 SInt16 version
 
typedef ByteCount size
 
typedef short top
 
typedef short short right
 
typedef short short short bottom
 
typedef struct QDProcs QDProcs
 
typedef QDProcsQDProcsPtr
 
typedef struct GrafPort GrafPort
 
typedef GrafPortGrafPtr
 
typedef GrafPtr WindowPtr
 
typedef WindowPtr DialogPtr
 
typedef WindowPtr WindowRef
 
typedef UInt16 DragConstraint
 
typedef struct RGBColor RGBColor
 
typedef RGBColorRGBColorPtr
 
typedef RGBColorPtrRGBColorHdl
 
typedef long * position
 
typedef struct ColorSpec ColorSpec
 
typedef ColorSpecColorSpecPtr
 
typedef ColorSpec CSpecArray[1]
 
typedef struct ColorTable ColorTable
 
typedef ColorTableCTabPtr
 
typedef CTabPtrCTabHandle
 
typedef struct xColorSpec xColorSpec
 
typedef xColorSpecxColorSpecPtr
 
typedef xColorSpec xCSpecArray[1]
 
typedef struct MatchRec MatchRec
 
typedef struct PixMap PixMap
 
typedef PixMapPixMapPtr
 
typedef PixMapPtrPixMapHandle
 
typedef struct PixPat PixPat
 
typedef PixPatPixPatPtr
 
typedef PixPatPtrPixPatHandle
 
typedef struct CCrsr CCrsr
 
typedef CCrsrCCrsrPtr
 
typedef CCrsrPtrCCrsrHandle
 
typedef struct GammaTbl GammaTbl
 
typedef GammaTblGammaTblPtr
 
typedef GammaTblPtrGammaTblHandle
 
typedef struct ITab ITab
 
typedef ITabITabPtr
 
typedef ITabPtrITabHandle
 
typedef struct SProcRec SProcRec
 
typedef SProcRecSProcPtr
 
typedef SProcPtrSProcHndl
 
typedef struct CProcRec CProcRec
 
typedef CProcRecCProcPtr
 
typedef CProcPtrCProcHndl
 
typedef struct GDevice GDevice
 
typedef GDeviceGDPtr
 
typedef GDPtrGDHandle
 
typedef struct GrafVars GrafVars
 
typedef GrafVarsGVarPtr
 
typedef GVarPtrGVarHandle
 
typedef struct CGrafPort CGrafPort
 
typedef CGrafPortCGrafPtr
 
typedef CGrafPtr currentPort
 
typedef CGrafPtr void * printerStatus
 
typedef struct CQDProcs CQDProcs
 
typedef CQDProcsCQDProcsPtr
 
typedef CGrafPtr CWindowPtr
 
typedef struct ReqListRec ReqListRec
 
typedef struct OpenCPicParams OpenCPicParams
 
typedef struct CursorImageRec CursorImageRec
 
typedef CursorImageRecCursorImagePtr
 
typedef short deviceFlags
 
typedef short GDHandle targetDevice
 
typedef short GDHandle long userData
 
typedef struct QDGlobals QDGlobals
 
typedef QDGlobalsQDGlobalsPtr
 
typedef QDGlobalsPtrQDGlobalsHdl
 
typedef SInt32 QDRegionParseDirection
 
typedef RgnHandle const Rectrect
 
typedef RgnHandle const Rect void * refCon
 
typedef struct CustomXFerRec CustomXFerRec
 
typedef CustomXFerRecCustomXFerRecPtr
 
typedef struct CursorInfo CursorInfo
 
typedef struct OpaqueQDRegionBitsRef * QDRegionBitsRef
 

Enumerations

enum  { invalColReq = -1 }
 
enum  {
  srcCopy = 0 , srcOr = 1 , srcXor = 2 , srcBic = 3 ,
  notSrcCopy = 4 , notSrcOr = 5 , notSrcXor = 6 , notSrcBic = 7 ,
  patCopy = 8 , patOr = 9 , patXor = 10 , patBic = 11 ,
  notPatCopy = 12 , notPatOr = 13 , notPatXor = 14 , notPatBic = 15 ,
  grayishTextOr = 49 , hilitetransfermode = 50 , hilite = 50 , blend = 32 ,
  addPin = 33 , addOver = 34 , subPin = 35 , addMax = 37 ,
  adMax = 37 , subOver = 38 , adMin = 39 , ditherCopy = 64 ,
  transparent = 36
}
 
enum  {
  italicBit = 1 , ulineBit = 2 , outlineBit = 3 , shadowBit = 4 ,
  condenseBit = 5 , extendBit = 6
}
 
enum  {
  normalBit = 0 , inverseBit = 1 , redBit = 4 , greenBit = 3 ,
  blueBit = 2 , cyanBit = 8 , magentaBit = 7 , yellowBit = 6 ,
  blackBit = 5
}
 
enum  {
  blackColor = 33 , whiteColor = 30 , redColor = 205 , greenColor = 341 ,
  blueColor = 409 , cyanColor = 273 , magentaColor = 137 , yellowColor = 69
}
 
enum  {
  picLParen = 0 , picRParen = 1 , clutType = 0 , fixedType = 1 ,
  directType = 2 , gdDevType = 0
}
 
enum  {
  interlacedDevice = 2 , hwMirroredDevice = 4 , roundedDevice = 5 , hasAuxMenuBar = 6 ,
  burstDevice = 7 , ext32Device = 8 , ramInit = 10 , mainScreen = 11 ,
  allInit = 12 , screenDevice = 13 , noDriver = 14 , screenActive = 15 ,
  hiliteBit = 7 , pHiliteBit = 0 , defQDColors = 127 , RGBDirect = 16 ,
  baseAddr32 = 4
}
 
enum  {
  sysPatListID = 0 , iBeamCursor = 1 , crossCursor = 2 , plusCursor = 3 ,
  watchCursor = 4
}
 
enum  {
  kQDGrafVerbFrame = 0 , kQDGrafVerbPaint = 1 , kQDGrafVerbErase = 2 , kQDGrafVerbInvert = 3 ,
  kQDGrafVerbFill = 4
}
 
enum  { chunky = 0 , chunkyPlanar = 1 , planar = 2 }
 
enum  { singleDevicesBit = 0 , dontMatchSeedsBit = 1 , allDevicesBit = 2 }
 
enum  { singleDevices = 1 << singleDevicesBit , dontMatchSeeds = 1 << dontMatchSeedsBit , allDevices = 1 << allDevicesBit }
 
enum  { kPrinterFontStatus = 0 , kPrinterScalingStatus = 1 }
 
enum  { uppQDTextProcInfo = 0x00003F80 }
 
enum  { uppQDLineProcInfo = 0x000000C0 }
 
enum  { uppQDRectProcInfo = 0x00000340 }
 
enum  { uppQDRRectProcInfo = 0x00002B40 }
 
enum  { uppQDOvalProcInfo = 0x00000340 }
 
enum  { uppQDArcProcInfo = 0x00002B40 }
 
enum  { uppQDPolyProcInfo = 0x00000340 }
 
enum  { uppQDRgnProcInfo = 0x00000340 }
 
enum  { uppQDBitsProcInfo = 0x0000EFC0 }
 
enum  { uppQDCommentProcInfo = 0x00000E80 }
 
enum  { uppQDTxMeasProcInfo = 0x0000FFA0 }
 
enum  { uppQDGetPicProcInfo = 0x000002C0 }
 
enum  { uppQDPutPicProcInfo = 0x000002C0 }
 
enum  { uppQDOpcodeProcInfo = 0x00002BC0 }
 
enum  { uppQDStdGlyphsProcInfo = 0x000003F1 }
 
enum  { uppQDJShieldCursorProcInfo = 0x00002A80 }
 
enum  { kNoConstraint = 0 , kVerticalConstraint = 1 , kHorizontalConstraint = 2 }
 
enum  { uppDragGrayRgnProcInfo = 0x00000000 }
 
enum  { uppColorSearchProcInfo = 0x000003D0 }
 
enum  { uppColorComplementProcInfo = 0x000000D0 }
 
enum  {
  k1MonochromePixelFormat = 0x00000001 , k2IndexedPixelFormat = 0x00000002 , k4IndexedPixelFormat = 0x00000004 , k8IndexedPixelFormat = 0x00000008 ,
  k16BE555PixelFormat = 0x00000010 , k24RGBPixelFormat = 0x00000018 , k32ARGBPixelFormat = 0x00000020 , k1IndexedGrayPixelFormat = 0x00000021 ,
  k2IndexedGrayPixelFormat = 0x00000022 , k4IndexedGrayPixelFormat = 0x00000024 , k8IndexedGrayPixelFormat = 0x00000028
}
 
enum  {
  k16LE555PixelFormat = FOUR_CHAR_CODE('L555') , k16LE5551PixelFormat = FOUR_CHAR_CODE('5551') , k16BE565PixelFormat = FOUR_CHAR_CODE('B565') , k16LE565PixelFormat = FOUR_CHAR_CODE('L565') ,
  k24BGRPixelFormat = FOUR_CHAR_CODE('24BG') , k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA') , k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR') , k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA') ,
  kYUVSPixelFormat , kYUVUPixelFormat , kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9') , kYUV411PixelFormat = FOUR_CHAR_CODE('Y411') ,
  kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU') , kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY') , kYUV211PixelFormat = FOUR_CHAR_CODE('Y211') , k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy')
}
 
enum  { kCursorImageMajorVersion = 0x0001 , kCursorImageMinorVersion = 0x0000 }
 
enum  { uppQDPrinterStatusProcInfo = 0x00000FF1 }
 
enum  { uppDeviceLoopDrawingProcInfo = 0x00003E80 }
 
enum  {
  kQDParseRegionFromTop = (1 << 0) , kQDParseRegionFromBottom = (1 << 1) , kQDParseRegionFromLeft = (1 << 2) , kQDParseRegionFromRight = (1 << 3) ,
  kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft , kQDParseRegionFromBottomRight
}
 
enum  { kQDRegionToRectsMsgInit = 1 , kQDRegionToRectsMsgParse = 2 , kQDRegionToRectsMsgTerminate = 3 }
 
enum  { uppRegionToRectsProcInfo = 0x00003FB1 }
 
enum  { colorXorXFer = 52 , noiseXFer = 53 , customXFer = 54 }
 
enum  { kXFer1PixelAtATime = 0x00000001 , kXFerConvertPixelToRGB32 }
 
enum  { kCursorComponentsVersion = 0x00010001 }
 
enum  { kCursorComponentType = FOUR_CHAR_CODE('curs') }
 
enum  { cursorDoesAnimate = 1L << 0 , cursorDoesHardware = 1L << 1 , cursorDoesUnreadableScreenBits = 1L << 2 }
 
enum  { kRenderCursorInHardware = 1L << 0 , kRenderCursorInSoftware = 1L << 1 }
 
enum  {
  kCursorComponentInit = 0x0001 , kCursorComponentGetInfo = 0x0002 , kCursorComponentSetOutputMode = 0x0003 , kCursorComponentSetData = 0x0004 ,
  kCursorComponentReconfigure = 0x0005 , kCursorComponentDraw = 0x0006 , kCursorComponentErase = 0x0007 , kCursorComponentMove = 0x0008 ,
  kCursorComponentAnimate = 0x0009 , kCursorComponentLastReserved = 0x0050
}
 

Functions

typedef CALLBACK_API (void, QDTextProcPtr)(short byteCount
 
typedef CALLBACK_API (void, QDLineProcPtr)(Point new Pt)
 
typedef CALLBACK_API (void, QDRectProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDRRectProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDOvalProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDArcProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDPolyProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDRgnProcPtr)(GrafVerb verb
 
typedef CALLBACK_API (void, QDBitsProcPtr)(const BitMap *srcBits
 
typedef CALLBACK_API (void, QDCommentProcPtr)(short kind
 
typedef CALLBACK_API (short, QDTxMeasProcPtr)(short byteCount
 
typedef CALLBACK_API (void, QDGetPicProcPtr)(void *dataPtr
 
typedef CALLBACK_API (void, QDPutPicProcPtr)(const void *dataPtr
 
typedef CALLBACK_API (void, QDOpcodeProcPtr)(const Rect *fromRect
 
typedef CALLBACK_API_C (OSStatus, QDStdGlyphsProcPtr)(void *dataStream
 
typedef CALLBACK_API (void, QDJShieldCursorProcPtr)(short left
 
typedef STACK_UPP_TYPE (QDTextProcPtr) QDTextUPP
 
typedef STACK_UPP_TYPE (QDLineProcPtr) QDLineUPP
 
typedef STACK_UPP_TYPE (QDRectProcPtr) QDRectUPP
 
typedef STACK_UPP_TYPE (QDRRectProcPtr) QDRRectUPP
 
typedef STACK_UPP_TYPE (QDOvalProcPtr) QDOvalUPP
 
typedef STACK_UPP_TYPE (QDArcProcPtr) QDArcUPP
 
typedef STACK_UPP_TYPE (QDPolyProcPtr) QDPolyUPP
 
typedef STACK_UPP_TYPE (QDRgnProcPtr) QDRgnUPP
 
typedef STACK_UPP_TYPE (QDBitsProcPtr) QDBitsUPP
 
typedef STACK_UPP_TYPE (QDCommentProcPtr) QDCommentUPP
 
typedef STACK_UPP_TYPE (QDTxMeasProcPtr) QDTxMeasUPP
 
typedef STACK_UPP_TYPE (QDGetPicProcPtr) QDGetPicUPP
 
typedef STACK_UPP_TYPE (QDPutPicProcPtr) QDPutPicUPP
 
typedef STACK_UPP_TYPE (QDOpcodeProcPtr) QDOpcodeUPP
 
typedef STACK_UPP_TYPE (QDStdGlyphsProcPtr) QDStdGlyphsUPP
 
typedef STACK_UPP_TYPE (QDJShieldCursorProcPtr) QDJShieldCursorUPP
 
QDTextUPP NewQDTextUPP (QDTextProcPtr userRoutine)
 
QDLineUPP NewQDLineUPP (QDLineProcPtr userRoutine)
 
QDRectUPP NewQDRectUPP (QDRectProcPtr userRoutine)
 
QDRRectUPP NewQDRRectUPP (QDRRectProcPtr userRoutine)
 
QDOvalUPP NewQDOvalUPP (QDOvalProcPtr userRoutine)
 
QDArcUPP NewQDArcUPP (QDArcProcPtr userRoutine)
 
QDPolyUPP NewQDPolyUPP (QDPolyProcPtr userRoutine)
 
QDRgnUPP NewQDRgnUPP (QDRgnProcPtr userRoutine)
 
QDBitsUPP NewQDBitsUPP (QDBitsProcPtr userRoutine)
 
QDCommentUPP NewQDCommentUPP (QDCommentProcPtr userRoutine)
 
QDTxMeasUPP NewQDTxMeasUPP (QDTxMeasProcPtr userRoutine)
 
QDGetPicUPP NewQDGetPicUPP (QDGetPicProcPtr userRoutine)
 
QDPutPicUPP NewQDPutPicUPP (QDPutPicProcPtr userRoutine)
 
QDOpcodeUPP NewQDOpcodeUPP (QDOpcodeProcPtr userRoutine)
 
QDStdGlyphsUPP NewQDStdGlyphsUPP (QDStdGlyphsProcPtr userRoutine)
 
QDJShieldCursorUPP NewQDJShieldCursorUPP (QDJShieldCursorProcPtr userRoutine)
 
void DisposeQDTextUPP (QDTextUPP userUPP)
 
void DisposeQDLineUPP (QDLineUPP userUPP)
 
void DisposeQDRectUPP (QDRectUPP userUPP)
 
void DisposeQDRRectUPP (QDRRectUPP userUPP)
 
void DisposeQDOvalUPP (QDOvalUPP userUPP)
 
void DisposeQDArcUPP (QDArcUPP userUPP)
 
void DisposeQDPolyUPP (QDPolyUPP userUPP)
 
void DisposeQDRgnUPP (QDRgnUPP userUPP)
 
void DisposeQDBitsUPP (QDBitsUPP userUPP)
 
void DisposeQDCommentUPP (QDCommentUPP userUPP)
 
void DisposeQDTxMeasUPP (QDTxMeasUPP userUPP)
 
void DisposeQDGetPicUPP (QDGetPicUPP userUPP)
 
void DisposeQDPutPicUPP (QDPutPicUPP userUPP)
 
void DisposeQDOpcodeUPP (QDOpcodeUPP userUPP)
 
void DisposeQDStdGlyphsUPP (QDStdGlyphsUPP userUPP)
 
void DisposeQDJShieldCursorUPP (QDJShieldCursorUPP userUPP)
 
void InvokeQDTextUPP (short byteCount, const void *textBuf, Point numer, Point denom, QDTextUPP userUPP)
 
void InvokeQDLineUPP (Point newPt, QDLineUPP userUPP)
 
void InvokeQDRectUPP (GrafVerb verb, const Rect *r, QDRectUPP userUPP)
 
void InvokeQDRRectUPP (GrafVerb verb, const Rect *r, short ovalWidth, short ovalHeight, QDRRectUPP userUPP)
 
void InvokeQDOvalUPP (GrafVerb verb, const Rect *r, QDOvalUPP userUPP)
 
void InvokeQDArcUPP (GrafVerb verb, const Rect *r, short startAngle, short arcAngle, QDArcUPP userUPP)
 
void InvokeQDPolyUPP (GrafVerb verb, PolyHandle poly, QDPolyUPP userUPP)
 
void InvokeQDRgnUPP (GrafVerb verb, RgnHandle rgn, QDRgnUPP userUPP)
 
void InvokeQDBitsUPP (const BitMap *srcBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn, QDBitsUPP userUPP)
 
void InvokeQDCommentUPP (short kind, short dataSize, Handle dataHandle, QDCommentUPP userUPP)
 
short InvokeQDTxMeasUPP (short byteCount, const void *textAddr, Point *numer, Point *denom, FontInfo *info, QDTxMeasUPP userUPP)
 
void InvokeQDGetPicUPP (void *dataPtr, short byteCount, QDGetPicUPP userUPP)
 
void InvokeQDPutPicUPP (const void *dataPtr, short byteCount, QDPutPicUPP userUPP)
 
void InvokeQDOpcodeUPP (const Rect *fromRect, const Rect *toRect, UInt16 opcode, SInt16 version, QDOpcodeUPP userUPP)
 
OSStatus InvokeQDStdGlyphsUPP (void *dataStream, ByteCount size, QDStdGlyphsUPP userUPP)
 
void InvokeQDJShieldCursorUPP (short left, short top, short right, short bottom, QDJShieldCursorUPP userUPP)
 
typedef CALLBACK_API (void, DragGrayRgnProcPtr)(void)
 
typedef CALLBACK_API (Boolean, ColorSearchProcPtr)(RGBColor *rgb
 
typedef CALLBACK_API (Boolean, ColorComplementProcPtr)(RGBColor *rgb)
 
typedef STACK_UPP_TYPE (DragGrayRgnProcPtr) DragGrayRgnUPP
 
typedef STACK_UPP_TYPE (ColorSearchProcPtr) ColorSearchUPP
 
typedef STACK_UPP_TYPE (ColorComplementProcPtr) ColorComplementUPP
 
DragGrayRgnUPP NewDragGrayRgnUPP (DragGrayRgnProcPtr userRoutine)
 
ColorSearchUPP NewColorSearchUPP (ColorSearchProcPtr userRoutine)
 
ColorComplementUPP NewColorComplementUPP (ColorComplementProcPtr userRoutine)
 
void DisposeDragGrayRgnUPP (DragGrayRgnUPP userUPP)
 
void DisposeColorSearchUPP (ColorSearchUPP userUPP)
 
void DisposeColorComplementUPP (ColorComplementUPP userUPP)
 
void InvokeDragGrayRgnUPP (DragGrayRgnUPP userUPP)
 
Boolean InvokeColorSearchUPP (RGBColor *rgb, long *position, ColorSearchUPP userUPP)
 
Boolean InvokeColorComplementUPP (RGBColor *rgb, ColorComplementUPP userUPP)
 
typedef CALLBACK_API_C (OSStatus, QDPrinterStatusProcPtr)(PrinterStatusOpcode opcode
 
typedef STACK_UPP_TYPE (QDPrinterStatusProcPtr) QDPrinterStatusUPP
 
typedef CALLBACK_API (void, DeviceLoopDrawingProcPtr)(short depth
 
typedef STACK_UPP_TYPE (DeviceLoopDrawingProcPtr) DeviceLoopDrawingUPP
 
QDPrinterStatusUPP NewQDPrinterStatusUPP (QDPrinterStatusProcPtr userRoutine)
 
DeviceLoopDrawingUPP NewDeviceLoopDrawingUPP (DeviceLoopDrawingProcPtr userRoutine)
 
void DisposeQDPrinterStatusUPP (QDPrinterStatusUPP userUPP)
 
void DisposeDeviceLoopDrawingUPP (DeviceLoopDrawingUPP userUPP)
 
OSStatus InvokeQDPrinterStatusUPP (PrinterStatusOpcode opcode, CGrafPtr currentPort, void *printerStatus, QDPrinterStatusUPP userUPP)
 
void InvokeDeviceLoopDrawingUPP (short depth, short deviceFlags, GDHandle targetDevice, long userData, DeviceLoopDrawingUPP userUPP)
 
void InitGraf (void *globalPtr)
 
void OpenPort (GrafPtr port)
 
void InitPort (GrafPtr port)
 
void ClosePort (GrafPtr port)
 
OSErr LockPortBits (GrafPtr port)
 
OSErr UnlockPortBits (GrafPtr port)
 
typedef CALLBACK_API_C (OSStatus, RegionToRectsProcPtr)(UInt16 message
 
typedef STACK_UPP_TYPE (RegionToRectsProcPtr) RegionToRectsUPP
 
RegionToRectsUPP NewRegionToRectsUPP (RegionToRectsProcPtr userRoutine)
 
void DisposeRegionToRectsUPP (RegionToRectsUPP userUPP)
 
OSStatus InvokeRegionToRectsUPP (UInt16 message, RgnHandle rgn, const Rect *rect, void *refCon, RegionToRectsUPP userUPP)
 
OSStatus QDRegionToRects (RgnHandle rgn, QDRegionParseDirection dir, RegionToRectsUPP proc, void *userData)
 
OSErr UpdatePort (GrafPtr port)
 
void * GetPortNativeWindow (GrafPtr macPort)
 Find which GrafPort is currently active. More...
 
GrafPtr GetNativeWindowPort (void *nativeWindow)
 
void * MacRegionToNativeRegion (RgnHandle macRegion)
 
RgnHandle NativeRegionToMacRegion (void *nativeRegion)
 
void MacSetPort (GrafPtr port)
 
void GetPort (GrafPtr *port)
 
Boolean QDSwapPort (CGrafPtr inNewPort, CGrafPtr *outOldPort)
 
void GrafDevice (short device)
 Set the device field for a GrafPort. More...
 
The third line above correctly adjusts for the required word alignment Example OffScreenDraw (short rWide, short rHigh, Rect rDest)
 Assigns a new bit map to the active GrafPort. More...
 
void SetPenState (const PenState *pnState)
 Set the pen location, size, pattern and mode. More...
 
void PenSize (short width, short height)
 Set dimensions of pen for current GrafPort. More...
 
void PenMode (short mode)
 Set the graphics pen pattern transfer mode. More...
 
void PenPat (const Pattern *pat)
 
void PenNormal (void)
 
void MoveTo (short h, short v)
 Set pen location without drawing. More...
 
void Move (short dh, short dv)
 the pen relative to its current location More...
 
void MacLineTo (short h, short v)
 
void Line (short dh, short dv)
 
void ForeColor (long color)
 
void BackColor (long color)
 
void ColorBit (short whichBit)
 Select color plane for subsequent drawing. More...
 
void MacSetRect (Rect *r, short left, short top, short right, short bottom)
 
void MacOffsetRect (Rect *r, short dh, short dv)
 
void MacInsetRect (Rect *r, short dh, short dv)
 
Boolean SectRect (const Rect *src1, const Rect *src2, Rect *dstRect)
 Get the intersection of two rectangles; check for overlap. More...
 
void MacUnionRect (const Rect *src1, const Rect *src2, Rect *dstRect)
 
Boolean MacEqualRect (const Rect *rect1, const Rect *rect2)
 
Boolean EmptyRect (const Rect *r)
 Determine if a rectangle is empty. More...
 
void MacFrameRect (const Rect *r)
 
void PaintRect (const Rect *r)
 
void EraseRect (const Rect *r)
 
void MacInvertRect (const Rect *r)
 
void MacFillRect (const Rect *r, const Pattern *pat)
 
void FrameOval (const Rect *r)
 
void PaintOval (const Rect *r)
 
void EraseOval (const Rect *r)
 
void InvertOval (const Rect *r)
 
void FillOval (const Rect *r, const Pattern *pat)
 
void FrameRoundRect (const Rect *r, short ovalWidth, short ovalHeight)
 
void PaintRoundRect (const Rect *r, short ovalWidth, short ovalHeight)
 
void EraseRoundRect (const Rect *r, short ovalWidth, short ovalHeight)
 
void InvertRoundRect (const Rect *r, short ovalWidth, short ovalHeight)
 
void FillRoundRect (const Rect *r, short ovalWidth, short ovalHeight, const Pattern *pat)
 
void FrameArc (const Rect *r, short startAngle, short arcAngle)
 
void PaintArc (const Rect *r, short startAngle, short arcAngle)
 
void EraseArc (const Rect *r, short startAngle, short arcAngle)
 
void InvertArc (const Rect *r, short startAngle, short arcAngle)
 
void FillArc (const Rect *r, short startAngle, short arcAngle, const Pattern *pat)
 
RgnHandle NewRgn (void)
 
void OpenRgn (void)
 
void CloseRgn (RgnHandle dstRgn)
 
OSErr BitMapToRegion (RgnHandle region, const BitMap *bMap)
 
void HandleToRgn (Handle oldRegion, RgnHandle region)
 
void RgnToHandle (RgnHandle region, Handle flattenedRgnDataHdl)
 
void DisposeRgn (RgnHandle rgn)
 
void MacCopyRgn (RgnHandle srcRgn, RgnHandle dstRgn)
 
void SetEmptyRgn (RgnHandle rgn)
 
void MacSetRectRgn (RgnHandle rgn, short left, short top, short right, short bottom)
 
void RectRgn (RgnHandle rgn, const Rect *r)
 
void MacOffsetRgn (RgnHandle rgn, short dh, short dv)
 
void InsetRgn (RgnHandle rgn, short dh, short dv)
 
void SectRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
 
void MacUnionRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
 
void DiffRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
 
void MacXorRgn (RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn)
 
Boolean RectInRgn (const Rect *r, RgnHandle rgn)
 Check if a rectangle intersects a region. More...
 
Boolean MacEqualRgn (RgnHandle rgnA, RgnHandle rgnB)
 
Boolean EmptyRgn (RgnHandle rgn)
 Determine if a Region is empty. More...
 
void MacFrameRgn (RgnHandle rgn)
 
void MacPaintRgn (RgnHandle rgn)
 
void EraseRgn (RgnHandle rgn)
 
void MacInvertRgn (RgnHandle rgn)
 
void MacFillRgn (RgnHandle rgn, const Pattern *pat)
 
void ScrollRect (const Rect *r, short dh, short dv, RgnHandle updateRgn)
 
void CopyBits (const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
 
void SeedFill (const void *srcPtr, void *dstPtr, short srcRow, short dstRow, short height, short words, short seedH, short seedV)
 Calculate a mask for use in CopyMask. More...
 
void CalcMask (const void *srcPtr, void *dstPtr, short srcRow, short dstRow, short height, short words)
 
void CopyMask (const BitMap *srcBits, const BitMap *maskBits, const BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect)
 
PicHandle OpenPicture (const Rect *picFrame)
 
void PicComment (short kind, short dataSize, Handle dataHandle)
 
void ClosePicture (void)
 
void DrawPicture (PicHandle myPicture, const Rect *dstRect)
 
void KillPicture (PicHandle myPicture)
 
PolyHandle OpenPoly (void)
 
void ClosePoly (void)
 
void KillPoly (PolyHandle poly)
 
void OffsetPoly (PolyHandle poly, short dh, short dv)
 Move a polygon. More...
 
void FramePoly (PolyHandle poly)
 
void PaintPoly (PolyHandle poly)
 
void ErasePoly (PolyHandle poly)
 
void InvertPoly (PolyHandle poly)
 
void FillPoly (PolyHandle poly, const Pattern *pat)
 
void SetPt (Point *pt, short h, short v)
 Pack horizontal and vertical coordinates into Point. More...
 
 SubPt (localPt, &tmpPt)
 
 OffsetPoly (thePoly, tmpPt.h, tmpPt.v)
 
 if (ctlCode==inThumb) } This function is also used as an intermediate step in converting between coordinates of two different grafPorts(e.g.
 
LocalToGlobal & topLeft (theRect)
 
LocalToGlobal & botRight (theRect)
 
 SetPort (windowB)
 
The Quickdraw global variable randSeed can also be used as a seed to start a pseudo random sequence Example unsigned short RangedRdm (unsigned short min, unsigned short max)
 
void StuffHex (void *thingPtr, ConstStr255Param s)
 Convert a string of hex digits to binary data. More...
 
Boolean MacGetPixel (short h, short v)
 
void ScalePt (Point *pt, const Rect *srcRect, const Rect *dstRect)
 Resize coordinate pair to ratio of two rectangles. More...
 
void MapRect (Rect *r, const Rect *srcRect, const Rect *dstRect)
 Scale and reposition a rectangle. More...
 
void MapRgn (RgnHandle rgn, const Rect *srcRect, const Rect *dstRect)
 
void MapPoly (PolyHandle poly, const Rect *srcRect, const Rect *dstRect)
 Scale and reposition a polygon. More...
 
pascal short myCommentProc (void)
 Set graphProcs field to point to custom routines. More...
 
void StdRect (GrafVerb verb, const Rect *r)
 
void StdRRect (GrafVerb verb, const Rect *r, short ovalWidth, short ovalHeight)
 
void StdOval (GrafVerb verb, const Rect *r)
 
void StdArc (GrafVerb verb, const Rect *r, short startAngle, short arcAngle)
 
void StdPoly (GrafVerb verb, PolyHandle poly)
 
void StdRgn (GrafVerb verb, RgnHandle rgn)
 
void StdBits (const BitMap *srcBits, const Rect *srcRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
 
void StdComment (short kind, short dataSize, Handle dataHandle)
 
void StdGetPic (void *dataPtr, short byteCount)
 The default Quickdraw picture-retrieving routine. More...
 
void StdPutPic (const void *dataPtr, short byteCount)
 
void StdOpcode (const Rect *fromRect, const Rect *toRect, UInt16 opcode, SInt16 version)
 
void AddPt (Point src, Point *dst)
 Add coordinates of two points. More...
 
Boolean MacPtInRect (Point pt, const Rect *r)
 
void Pt2Rect (Point pt1, Point pt2, Rect *dstRect)
 Find smallest rectangle enclosing two points. More...
 
void PtToAngle (const Rect *r, Point pt, short *angle)
 Obtain angle between point and rectangle center. More...
 
void SubPt (Point src, Point *dst)
 Subtract coordinates of one point from another. More...
 
void StdLine (Point newPt)
 
void OpenCPort (CGrafPtr port)
 
void InitCPort (CGrafPtr port)
 
void CloseCPort (CGrafPtr port)
 
PixMapHandle NewPixMap (void)
 
void DisposePixMap (PixMapHandle pm)
 
void CopyPixMap (PixMapHandle srcPM, PixMapHandle dstPM)
 Duplicate pixMap's structure to an existing pixmap. More...
 
PixPatHandle NewPixPat (void)
 
void DisposePixPat (PixPatHandle pp)
 
void CopyPixPat (PixPatHandle srcPP, PixPatHandle dstPP)
 Duplicate pixPat's structure to an existing region. More...
 
void PenPixPat (PixPatHandle pp)
 
void BackPixPat (PixPatHandle pp)
 
PixPatHandle GetPixPat (short patID)
 
void MakeRGBPat (PixPatHandle pp, const RGBColor *myColor)
 Provides best possible RGB match on current device. More...
 
void FillCRect (const Rect *r, PixPatHandle pp)
 
void FillCOval (const Rect *r, PixPatHandle pp)
 
void FillCRoundRect (const Rect *r, short ovalWidth, short ovalHeight, PixPatHandle pp)
 
void FillCArc (const Rect *r, short startAngle, short arcAngle, PixPatHandle pp)
 
void FillCRgn (RgnHandle rgn, PixPatHandle pp)
 
void FillCPoly (PolyHandle poly, PixPatHandle pp)
 
void RGBForeColor (const RGBColor *color)
 
void RGBBackColor (const RGBColor *color)
 
void SetCPixel (short h, short v, const RGBColor *cPix)
 
void SetPortPix (PixMapHandle pm)
 Replaces a portPixMap of the active CGrafPort with a handle. More...
 
void GetCPixel (short h, short v, RGBColor *cPix)
 Find the RGB of a specified pixel. More...
 
void GetForeColor (RGBColor *color)
 Obtain foreground color set in current port. More...
 
void GetBackColor (RGBColor *color)
 Obtain foreground color set in current port. More...
 
void SeedCFill (const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, short seedH, short seedV, ColorSearchUPP matchProc, long matchData)
 Calculate a mask for use in CopyMask or CopyBits. More...
 
void CalcCMask (const BitMap *srcBits, const BitMap *dstBits, const Rect *srcRect, const Rect *dstRect, const RGBColor *seedRGB, ColorSearchUPP matchProc, long matchData)
 Calculate a mask for use in CopyMask. More...
 
PicHandle OpenCPicture (const OpenCPicParams *newHeader)
 
void OpColor (const RGBColor *color)
 Set RGB values used by addPin, subPin and blend modes. More...
 
void HiliteColor (const RGBColor *color)
 Choose new highlighting color. More...
 
void DisposeCTable (CTabHandle cTable)
 
CTabHandle GetCTable (short ctID)
 
CCrsrHandle GetCCursor (short crsrID)
 
void SetCCursor (CCrsrHandle cCrsr)
 
void AllocCursor (void)
 
void DisposeCCursor (CCrsrHandle cCrsr)
 
void SetStdCProcs (CQDProcs *procs)
 Set graphProcs field to point to custom routines. More...
 
GDHandle GetMaxDevice (const Rect *globalRect)
 Gives a handle to device with the deepest pixMap. More...
 
long GetCTSeed (void)
 Get unique seed value for color table. More...
 
GDHandle GetDeviceList (void)
 Provides a handle to the first gDevice in the DeviceList. More...
 
GDHandle GetMainDevice (void)
 Provides a handle to the startup gDevice. More...
 
GDHandle GetNextDevice (GDHandle curDevice)
 
Boolean TestDeviceAttribute (GDHandle gdh, short attribute)
 TestDeviceAttribute Check whether or not an attribute is set. More...
 
void SetDeviceAttribute (GDHandle gdh, short attribute, Boolean value)
 SetDeviceAttribute Set the device's display characteristics. More...
 
void InitGDevice (short qdRefNum, long mode, GDHandle gdh)
 
GDHandle NewGDevice (short refNum, long mode)
 
void DisposeGDevice (GDHandle gdh)
 
void SetGDevice (GDHandle gd)
 Set the current device to the specified device. More...
 
GDHandle GetGDevice (void)
 Get handle to current GDevice. More...
 
long Color2Index (const RGBColor *myColor)
 
void Index2Color (long index, RGBColor *aColor)
 Find specific RGB. More...
 
void InvertColor (RGBColor *myColor)
 Find a color's complement. More...
 
Boolean RealColor (const RGBColor *color)
 
void GetSubTable (CTabHandle myColors, short iTabRes, CTabHandle targetTbl)
 
void MakeITable (CTabHandle cTabH, ITabHandle iTabH, short res)
 
void AddSearch (ColorSearchUPP searchProc)
 
void AddComp (ColorComplementUPP compProc)
 
void DelSearch (ColorSearchUPP searchProc)
 
void DelComp (ColorComplementUPP compProc)
 
void SetClientID (short id)
 Identify this client to search and complement procedures. More...
 
void ProtectEntry (short index, Boolean protect)
 Protect or un-protect color table entry. More...
 
void ReserveEntry (short index, Boolean reserve)
 Reserve or dereserve color table entry. More...
 
void SetEntries (short start, short count, CSpecArray aTable)
 Set a group of color table entries for the current gDevice. More...
 
void SaveEntries (CTabHandle srcTable, CTabHandle resultTable, ReqListRec *selection)
 Saves selected entries to a result table. More...
 
void RestoreEntries (CTabHandle srcTable, CTabHandle dstTable, ReqListRec *selection)
 Sets entries into dstTable without rebuilding inverse table. More...
 
short QDError (void)
 Return error result from last QuickDraw call. More...
 
void CopyDeepMask (const BitMap *srcBits, const BitMap *maskBits, const BitMap *dstBits, const Rect *srcRect, const Rect *maskRect, const Rect *dstRect, short mode, RgnHandle maskRgn)
 
void DeviceLoop (RgnHandle drawingRgn, DeviceLoopDrawingUPP drawingProc, long userData, DeviceLoopFlags flags)
 
Ptr GetMaskTable (void)
 Get table of masks from ROM. More...
 
PatHandle GetPattern (short patternID)
 
CursHandle MacGetCursor (short cursorID)
 
PicHandle GetPicture (short pictureID)
 
long DeltaPoint (Point ptA, Point ptB)
 Calculate distance between two points. More...
 
An alternative method is to convert shieldRect to global coordinates (via LocalToGlobal) before the call
 Hide cursor while moving (or while in) a rectangle. More...
 
An alternative method is to convert shieldRect to global and pass(0, 0) as offsetPt.</pre > *@par Copyright void ScreenRes (short *scrnHRes, short *scrnVRes)
 Obtain screen resolution in pixels-per-inch. More...
 
void GetIndPattern (Pattern *thePat, short patternListID, short index)
 
Boolean ptinrect (const Point *pt, const Rect *r)
 
void pt2rect (const Point *pt1, const Point *pt2, Rect *destRect)
 
void pttoangle (const Rect *r, const Point *pt, short *angle)
 
Boolean ptinrgn (const Point *pt, RgnHandle rgn)
 
void addpt (const Point *src, Point *dst)
 
void subpt (const Point *src, Point *dst)
 
Boolean equalpt (const Point *pt1, const Point *pt2)
 
void stuffhex (void *thingPtr, const char *s)
 
void stdline (const Point *newPt)
 
void shieldcursor (const Rect *shieldRect, Point *offsetPt)
 
long deltapoint (Point *ptA, Point *ptB)
 
void UnpackBits (Ptr *srcPtr, Ptr *dstPtr, short dstBytes)
 Uncompress data stored via PackBits. More...
 
 MoveTo (startPt.h, startPt.v)
 
 Line (dh, dv)
 
typedef CALLBACK_API (void, CustomXFerProcPtr)(CustomXFerRecPtr info)
 
OSErr GetPortCustomXFerProc (CGrafPtr port, CustomXFerProcPtr *proc, UInt32 *flags, UInt32 *refCon)
 
OSErr SetPortCustomXFerProc (CGrafPtr port, CustomXFerProcPtr proc, UInt32 flags, UInt32 refCon)
 
OSErr OpenCursorComponent (Component c, ComponentInstance *ci)
 
OSErr CloseCursorComponent (ComponentInstance ci)
 
OSErr SetCursorComponent (ComponentInstance ci)
 
OSErr CursorComponentChanged (ComponentInstance ci)
 
OSErr CursorComponentSetData (ComponentInstance ci, long data)
 
Boolean IsValidPort (CGrafPtr port)
 
Boolean QDIsPortBuffered (CGrafPtr port)
 
Boolean QDIsPortBufferDirty (CGrafPtr port)
 
void QDFlushPortBuffer (CGrafPtr port, RgnHandle region)
 
OSStatus QDGetDirtyRegion (CGrafPtr port, RgnHandle rgn)
 
OSStatus QDSetDirtyRegion (CGrafPtr port, RgnHandle rgn)
 
OSStatus QDAddRectToDirtyRegion (CGrafPtr inPort, const Rect *inBounds)
 
OSStatus QDAddRegionToDirtyRegion (CGrafPtr inPort, RgnHandle inRegion)
 
OSStatus CreateCGContextForPort (CGrafPtr inPort, CGContextRef *outContext)
 
OSStatus ClipCGContextToRegion (CGContextRef gc, const Rect *portRect, RgnHandle region)
 
OSStatus SyncCGContextOriginWithPort (CGContextRef inContext, CGrafPtr port)
 
OSStatus QDBeginCGContext (CGrafPtr inPort, CGContextRef *outContext)
 
OSStatus QDEndCGContext (CGrafPtr inPort, CGContextRef *inoutContext)
 
QDRegionBitsRef QDSaveRegionBits (RgnHandle region)
 
OSStatus QDRestoreRegionBits (RgnHandle region, QDRegionBitsRef regionBits)
 
OSStatus QDDisposeRegionBits (QDRegionBitsRef regionBits)
 
CGrafPtr CreateNewPortForCGDisplayID (UInt32 inCGDisplayID)
 
void QDDisplayWaitCursor (Boolean forceWaitCursor)
 
void QDSetPatternOrigin (Point origin)
 
void QDGetPatternOrigin (Point *origin)
 
SInt16 LMGetScrVRes (void)
 
void LMSetScrVRes (SInt16 value)
 
SInt16 LMGetScrHRes (void)
 
void LMSetScrHRes (SInt16 value)
 
GDHandle LMGetMainDevice (void)
 
void LMSetMainDevice (GDHandle value)
 
GDHandle LMGetDeviceList (void)
 
void LMSetDeviceList (GDHandle value)
 
Handle LMGetQDColors (void)
 
void LMSetQDColors (Handle value)
 
Handle LMGetWidthListHand (void)
 
void LMSetWidthListHand (Handle value)
 
UInt8 LMGetHiliteMode (void)
 
void LMSetHiliteMode (UInt8 value)
 
Ptr LMGetWidthPtr (void)
 
void LMSetWidthPtr (Ptr value)
 
Handle LMGetWidthTabHandle (void)
 
void LMSetWidthTabHandle (Handle value)
 
SInt32 LMGetLastSPExtra (void)
 
void LMSetLastSPExtra (SInt32 value)
 
Handle LMGetLastFOND (void)
 
void LMSetLastFOND (Handle value)
 
UInt8 LMGetFractEnable (void)
 
void LMSetFractEnable (UInt8 value)
 
GDHandle LMGetTheGDevice (void)
 
void LMSetTheGDevice (GDHandle value)
 
void LMGetHiliteRGB (RGBColor *hiliteRGBValue)
 
void LMSetHiliteRGB (const RGBColor *hiliteRGBValue)
 
Boolean LMGetCursorNew (void)
 
void LMSetCursorNew (Boolean value)
 

Variables

QDGlobals qd
 
</pre > *par Copyright
 Check if a specified pixel is enclosed by a region. More...
 
LocalToGlobal & tmpPt
 Obtain global (screen) value of local point. More...
 
 ctlCode = FindControl(myEvent.where, myWindow, &myCtl)
 Obtain local coordinates of global point. More...
 
windows For instance
 
windows For to convert the position of rectangle theRect from the coordinates of windowA to the coordinates of windowB
 
To convert between the coordinates of regions and polygons
 
 theRand = Random()
 Obtain pseudo-random signed integer. More...
 
 w1 = r1.right - r1.left
 Map point relative to two rectangles. More...
 
 w2 = r2.right - r2.left
 
thePoint h = (thePoint.h * w1) / w2
 
SetStdProcs & myQDProcs
 
myQDProcs commentProc = (QDPtr)myCommentProc
 
thePort grafProcs = &myQDProcs
 
they are equal or the more efficient
 Check if two points are identical. More...
 
they are equal or the more Point pt2
 
</pre > *par Ptr * dstPtr
 
</pre > *par Ptr short srcBytes
 
 dv = startPt.v - endPt.v
 Calculate slope given an angle. More...
 
 dh = FixRound(FixMul(INT2FIX(dv), theSlope))
 
Fixed theSlope = FixRatio(INT2FIX(dh), INT2FIX(dv))
 Calculate angle given slope. More...
 
Point startPt
 
Point endPt
 
short theAngle = AngleFromSlope(theSlope)
 
in CarbonLib and later *par Mac OS X
 

Detailed Description

Interface to Quickdraw Graphics.

Version: Universal Interfaces 3.4.1

Copyright: � 1985-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallDeviceLoopDrawingProc

#define CallDeviceLoopDrawingProc (   userRoutine,
  depth,
  deviceFlags,
  targetDevice,
  userData 
)
Value:
InvokeDeviceLoopDrawingUPP(depth, deviceFlags, targetDevice, userData, \
userRoutine)
void InvokeDeviceLoopDrawingUPP(short depth, short deviceFlags, GDHandle targetDevice, long userData, DeviceLoopDrawingUPP userUPP)

◆ InvokeColorSearchUPP

#define InvokeColorSearchUPP (   rgb,
  position,
  userUPP 
)
Value:
(Boolean) CALL_TWO_PARAMETER_UPP((userUPP), uppColorSearchProcInfo, (rgb), \
(position))
unsigned char Boolean
Definition: MacTypes.h:318

◆ InvokeDeviceLoopDrawingUPP

#define InvokeDeviceLoopDrawingUPP (   depth,
  deviceFlags,
  targetDevice,
  userData,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppDeviceLoopDrawingProcInfo, (depth), \
(deviceFlags), (targetDevice), (userData))

◆ InvokeQDArcUPP

#define InvokeQDArcUPP (   verb,
  r,
  startAngle,
  arcAngle,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppQDArcProcInfo, (verb), (r), \
(startAngle), (arcAngle))

◆ InvokeQDBitsUPP

#define InvokeQDBitsUPP (   srcBits,
  srcRect,
  dstRect,
  mode,
  maskRgn,
  userUPP 
)
Value:
CALL_FIVE_PARAMETER_UPP((userUPP), uppQDBitsProcInfo, (srcBits), (srcRect), \
(dstRect), (mode), (maskRgn))
Definition: MacTypes.h:527

◆ InvokeQDCommentUPP

#define InvokeQDCommentUPP (   kind,
  dataSize,
  dataHandle,
  userUPP 
)
Value:
CALL_THREE_PARAMETER_UPP((userUPP), uppQDCommentProcInfo, (kind), \
(dataSize), (dataHandle))

◆ InvokeQDJShieldCursorUPP

#define InvokeQDJShieldCursorUPP (   left,
  top,
  right,
  bottom,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppQDJShieldCursorProcInfo, (left), \
(top), (right), (bottom))

◆ InvokeQDOpcodeUPP

#define InvokeQDOpcodeUPP (   fromRect,
  toRect,
  opcode,
  version,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppQDOpcodeProcInfo, (fromRect), \
(toRect), (opcode), (version))

◆ InvokeQDPrinterStatusUPP

#define InvokeQDPrinterStatusUPP (   opcode,
  currentPort,
  printerStatus,
  userUPP 
)
Value:
(OSStatus) \
CALL_THREE_PARAMETER_UPP((userUPP), uppQDPrinterStatusProcInfo, \
(opcode), (currentPort), (printerStatus))
Definition: Quickdraw.h:2261

◆ InvokeQDRRectUPP

#define InvokeQDRRectUPP (   verb,
  r,
  ovalWidth,
  ovalHeight,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppQDRRectProcInfo, (verb), (r), \
(ovalWidth), (ovalHeight))

◆ InvokeQDStdGlyphsUPP

#define InvokeQDStdGlyphsUPP (   dataStream,
  size,
  userUPP 
)
Value:
(OSStatus) CALL_TWO_PARAMETER_UPP((userUPP), uppQDStdGlyphsProcInfo, \
(dataStream), (size))

◆ InvokeQDTextUPP

#define InvokeQDTextUPP (   byteCount,
  textBuf,
  numer,
  denom,
  userUPP 
)
Value:
CALL_FOUR_PARAMETER_UPP((userUPP), uppQDTextProcInfo, (byteCount), \
(textBuf), (numer), (denom))

◆ InvokeQDTxMeasUPP

#define InvokeQDTxMeasUPP (   byteCount,
  textAddr,
  numer,
  denom,
  info,
  userUPP 
)
Value:
(short)CALL_FIVE_PARAMETER_UPP((userUPP), uppQDTxMeasProcInfo, (byteCount), \
(textAddr), (numer), (denom), (info))

◆ InvokeRegionToRectsUPP

#define InvokeRegionToRectsUPP (   message,
  rgn,
  rect,
  refCon,
  userUPP 
)
Value:
(OSStatus) CALL_FOUR_PARAMETER_UPP((userUPP), uppRegionToRectsProcInfo, \
(message), (rgn), (rect), (refCon))
Definition: Quickdraw.h:306

◆ NewColorComplementUPP

#define NewColorComplementUPP (   userRoutine)
Value:
(ColorComplementUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorComplementProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

◆ NewColorSearchUPP

#define NewColorSearchUPP (   userRoutine)
Value:
(ColorSearchUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppColorSearchProcInfo, \
GetCurrentArchitecture())

◆ NewDeviceLoopDrawingUPP

#define NewDeviceLoopDrawingUPP (   userRoutine)
Value:
(DeviceLoopDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppDeviceLoopDrawingProcInfo, \
GetCurrentArchitecture())

◆ NewDragGrayRgnUPP

#define NewDragGrayRgnUPP (   userRoutine)
Value:
(DragGrayRgnUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragGrayRgnProcInfo, \
GetCurrentArchitecture())

◆ NewQDArcUPP

#define NewQDArcUPP (   userRoutine)
Value:
(QDArcUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDArcProcInfo, \
GetCurrentArchitecture())

◆ NewQDBitsUPP

#define NewQDBitsUPP (   userRoutine)
Value:
(QDBitsUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDBitsProcInfo, \
GetCurrentArchitecture())

◆ NewQDCommentUPP

#define NewQDCommentUPP (   userRoutine)
Value:
(QDCommentUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDCommentProcInfo, GetCurrentArchitecture())

◆ NewQDGetPicUPP

#define NewQDGetPicUPP (   userRoutine)
Value:
(QDGetPicUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDGetPicProcInfo, GetCurrentArchitecture())

◆ NewQDJShieldCursorUPP

#define NewQDJShieldCursorUPP (   userRoutine)
Value:
(QDJShieldCursorUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDJShieldCursorProcInfo, \
GetCurrentArchitecture())

◆ NewQDLineUPP

#define NewQDLineUPP (   userRoutine)
Value:
(QDLineUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDLineProcInfo, \
GetCurrentArchitecture())

◆ NewQDOpcodeUPP

#define NewQDOpcodeUPP (   userRoutine)
Value:
(QDOpcodeUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDOpcodeProcInfo, GetCurrentArchitecture())

◆ NewQDOvalUPP

#define NewQDOvalUPP (   userRoutine)
Value:
(QDOvalUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDOvalProcInfo, \
GetCurrentArchitecture())

◆ NewQDPolyUPP

#define NewQDPolyUPP (   userRoutine)
Value:
(QDPolyUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPolyProcInfo, \
GetCurrentArchitecture())

◆ NewQDPrinterStatusUPP

#define NewQDPrinterStatusUPP (   userRoutine)
Value:
(QDPrinterStatusUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDPrinterStatusProcInfo, \
GetCurrentArchitecture())

◆ NewQDPutPicUPP

#define NewQDPutPicUPP (   userRoutine)
Value:
(QDPutPicUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDPutPicProcInfo, GetCurrentArchitecture())

◆ NewQDRectUPP

#define NewQDRectUPP (   userRoutine)
Value:
(QDRectUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRectProcInfo, \
GetCurrentArchitecture())

◆ NewQDRgnUPP

#define NewQDRgnUPP (   userRoutine)
Value:
(QDRgnUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDRgnProcInfo, \
GetCurrentArchitecture())

◆ NewQDRRectUPP

#define NewQDRRectUPP (   userRoutine)
Value:
(QDRRectUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDRRectProcInfo, GetCurrentArchitecture())

◆ NewQDStdGlyphsUPP

#define NewQDStdGlyphsUPP (   userRoutine)
Value:
(QDStdGlyphsUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDStdGlyphsProcInfo, \
GetCurrentArchitecture())

◆ NewQDTextUPP

#define NewQDTextUPP (   userRoutine)
Value:
(QDTextUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppQDTextProcInfo, \
GetCurrentArchitecture())

◆ NewQDTxMeasUPP

#define NewQDTxMeasUPP (   userRoutine)
Value:
(QDTxMeasUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppQDTxMeasProcInfo, GetCurrentArchitecture())

◆ NewRegionToRectsUPP

#define NewRegionToRectsUPP (   userRoutine)
Value:
(RegionToRectsUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppRegionToRectsProcInfo, \
GetCurrentArchitecture())

◆ OLDGDEVICESTRUCT

#define OLDGDEVICESTRUCT   0

QuickTime 3.0 makes GDevice data structure available on non-Mac OS's. In order to implement GDevice in these alternate environments, the GDevice had to be extended. The gdReserved field was changed to gdExt which is a Handle to extra info.

◆ OLDPIXMAPSTRUCT

#define OLDPIXMAPSTRUCT   0

QuickTime 3.0 makes PixMap data structure available on non-Mac OS's. In order to implement PixMap in these alternate environments, the PixMap had to be extended. The pmReserved field was changed to pmExt which is a Handle to extra info. The planeBytes field was changed to pixelFormat.

In OS X, Quickdraw also uses the new PixMap data structure.

Typedef Documentation

◆ ConstPatternParam

typedef const Pattern* ConstPatternParam

ConstPatternParam is no longer needed. It was first created when Pattern was an array. Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").

◆ PolyPtr

typedef MacPolygon* PolyPtr

The type name "Polygon" has a name space collision on Win32. Use MacPolygon to be cross-platfrom safe.

◆ PrinterStatusOpcode

typedef SInt32 PrinterStatusOpcode

PrinterStatusOpcode. For communication with downloading and printing services.

◆ QDRegionBitsRef

typedef struct OpaqueQDRegionBitsRef* QDRegionBitsRef

The following routines are implemented in CarbonLib, and on Mac OS X in QD proper. They save the pixel data of a region in a packed format for quick save/restore without using a lot of memory to do a large, hollow region, such as the region used when drag hiliting (which is where this is used).

◆ rect

typedef const TQARect * rect
Initial value:
{
return (*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL)
? *(rect)
: ((Rect *)(*(((WindowPeek)window)->dataHandle)))[0])),
(rect)
#define NULL
Definition: MacTypes.h:61
Definition: Quickdraw.h:1648
Definition: MacWindows.h:754

◆ RgnPtr

typedef MacRegion* RgnPtr

The type name "Region" has a name space collision on Win32. Use MacRegion to be cross-platfrom safe.

◆ WindowPtr

typedef GrafPtr WindowPtr

This set of definitions "belongs" in Windows. But, there is a circularity in the headers where Windows includes Controls and Controls includes Windows. To break the circle, the information needed by Controls is moved from Windows to Quickdraw.

Function Documentation

◆ AddComp()

void AddComp ( ColorComplementUPP  compProc)

AddComp()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ addpt()

void addpt ( const Point src,
Point dst 
)

addpt()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ AddPt()

void AddPt ( Point  src,
Point dst 
)

Add coordinates of two points.

AddPt adds the coordinates of two Points, storing the result into the second.
srcPtis a 4-byte Point structure. Its low word is the horizontal
coordinate and its high word is the vertical coordinate.
destPtis the address of a 4-byte Point structure. Upon return, it will
contain the sums (srcPt.h+destPt.h) and (srcPt.v+destPt.v).
Returns
none
Note
AddPt is functionally equivalent to:
destPt.h += srcPt.h;
destPt.v += srcPt.v;
Use SubPt or DeltaPoint to calculate the difference between two Points.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AddSearch()

void AddSearch ( ColorSearchUPP  searchProc)

AddSearch()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AllocCursor()

void AllocCursor ( void  )

AllocCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BackColor()

void BackColor ( long  color)

BackColor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BackPixPat()

void BackPixPat ( PixPatHandle  pp)

BackPixPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BitMapToRegion()

OSErr BitMapToRegion ( RgnHandle  region,
const BitMap bMap 
)

BitMapToRegion()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CalcCMask()

void CalcCMask ( const BitMap srcBits,
const BitMap dstBits,
const Rect srcRect,
const Rect dstRect,
const RGBColor seedRGB,
ColorSearchUPP  matchProc,
long  matchData 
)

Calculate a mask for use in CopyMask.

Parameters
matchProccustom matching routine; NIL = default
CalcCMask examines a portion of a bitmap and creates a mask that can be
used with CopyMask . It finds the outermost outline of any figure in the
bitmap (as in the lasso tool of many paint programs) and creates a mask having
1s in the places where paint would "leak" were you to pour it inside the figure.
The object of this procedure is the reverse of SeedCFill in that it protects
areas from being filled with color.
srcMap is the address (srcBits) of a rectangle inside a BitMap or
PixMap data area. CalcCMask examines this rectangle as it floods
portions of the destination bitMap.
destMap is the address (destBits) of a rectangle inside a BitMap or
PixMap data area. CalcCMask fills all or part of this rectangle
with 1s.
 srcRect  and . . .
 destRect are the rectangles within the BitMap or PixMap into which srcMap
␅ and destMap, respectively point; i.e., the function will add this
value to its current address pointer to move "down one line" in the
BitMap.
seedRGB is the RGBvalue of the pixel from which calculations begin.
matchProc  is a pointer to a custom routine to be used instead of the default
searchProc. It should return 1's for RGB values that define the edges
of the mask and 0's for values that do not. Pass NIL in this parameter
to use the default searchProc. See
Custom Search and Complement Procedures for more on
writing a custom searchProc.
matchData  holds application specific data. Pass 0 in this parameter to obtain
the default behavior.
Returns
none
Note
Use CalcCMask to build a mask which can be used in conjunction with
CopyMask to implement the "lasso" tool of many paint programs.
CalcCMask creates an area into which paint won't flow. By default, paint
can leak to all adjacent pixels whose RGB values don't match that of the
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CalcMask()

void CalcMask ( const void *  srcPtr,
void *  dstPtr,
short  srcRow,
short  dstRow,
short  height,
short  words 
)

CalcMask()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClipCGContextToRegion()

OSStatus ClipCGContextToRegion ( CGContextRef  gc,
const Rect portRect,
RgnHandle  region 
)

ClipCGContextToRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
Mac OS X: in version 10.0 and later

◆ CloseCPort()

void CloseCPort ( CGrafPtr  port)

CloseCPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ CloseCursorComponent()

OSErr CloseCursorComponent ( ComponentInstance  ci)

CloseCursorComponent()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClosePicture()

void ClosePicture ( void  )

ClosePicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClosePoly()

void ClosePoly ( void  )

ClosePoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClosePort()

void ClosePort ( GrafPtr  port)

ClosePort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ CloseRgn()

void CloseRgn ( RgnHandle  dstRgn)

CloseRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ Color2Index()

long Color2Index ( const RGBColor myColor)

Color2Index()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ColorBit()

void ColorBit ( short  whichBit)

Select color plane for subsequent drawing.

ColorBit selects the "color plane" to which Quickdraw should direct
subsequent drawing operations. This function is part of the "old model"
Quickdraw color support.
whichPlane specifies the plane number. Black-and-white devices have only one
color plane (plane 0). Quickdraw supports drawing to devices that
can interpret up to 32 planes of color information.
Returns
none
Note
This sets the value of the colrBit field of the current GrafPort structure.
It is used for drawing in color while remaining compatible with pre-MacII
Macs. It may also be used in sophisticated applications for creating overlays.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ coordinates()

An alternative method is to convert shieldRect to global coordinates ( via  LocalToGlobal)

Hide cursor while moving (or while in) a rectangle.

ShieldCursor ( &shieldRect, thePort->portBits.bounds.topLeft );:
ShowCursor ();/* when you no longer need to shield 

◆ CopyBits()

void CopyBits ( const BitMap srcBits,
const BitMap dstBits,
const Rect srcRect,
const Rect dstRect,
short  mode,
RgnHandle  maskRgn 
)

CopyBits()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CopyDeepMask()

void CopyDeepMask ( const BitMap srcBits,
const BitMap maskBits,
const BitMap dstBits,
const Rect srcRect,
const Rect maskRect,
const Rect dstRect,
short  mode,
RgnHandle  maskRgn 
)

CopyDeepMask()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CopyMask()

void CopyMask ( const BitMap srcBits,
const BitMap maskBits,
const BitMap dstBits,
const Rect srcRect,
const Rect maskRect,
const Rect dstRect 
)

CopyMask()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CopyPixMap()

void CopyPixMap ( PixMapHandle  srcPM,
PixMapHandle  dstPM 
)

Duplicate pixMap's structure to an existing pixmap.

CopyPixMap copies the data of one pixel map into another.
srcPm is the handle of an existing pixel map you wish to duplicate.
destPm is the handle of destination pixel map.
Returns
none
Note
CopyPixMap copies the contents of the color table, giving the destination
PixMap its own.
The image is not copied -- only the pointer that is the pixMap's baseAddr
field (base address).
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CopyPixPat()

void CopyPixPat ( PixPatHandle  srcPP,
PixPatHandle  dstPP 
)

Duplicate pixPat's structure to an existing region.

CopyPixPat copies the data of one pixPat into another.
srcPP is the handle of an existing pixPat you wish to duplicate.
destPP is the handle of destination pixPat.
Returns
none
Note
CopyPixPat copies the entire contents of the pixel pattern, including
color table, data handle, expanded data handle, expanded map, and pixMap
handle.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateCGContextForPort()

OSStatus CreateCGContextForPort ( CGrafPtr  inPort,
CGContextRef *  outContext 
)

CreateCGContextForPort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
Mac OS X: in version 10.0 and later

◆ CreateNewPortForCGDisplayID()

CGrafPtr CreateNewPortForCGDisplayID ( UInt32  inCGDisplayID)

Developers need a way to go from a CGDirectDisplay environment to Quickdraw. The following is equivalent to CreateNewPort(), but instead of taking the portPixMap from the current GDevice, it uses the GDevice corresponding to the CGSDisplayID passed in. If the CGSDisplayID is invalid, the mainDevice is used instead. CreateNewPortForCGDisplayID()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
Mac OS X: in version 10.0 and later

◆ CursorComponentChanged()

OSErr CursorComponentChanged ( ComponentInstance  ci)

CursorComponentChanged()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CursorComponentSetData()

OSErr CursorComponentSetData ( ComponentInstance  ci,
long  data 
)

CursorComponentSetData()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DelComp()

void DelComp ( ColorComplementUPP  compProc)

DelComp()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DelSearch()

void DelSearch ( ColorSearchUPP  searchProc)

DelSearch()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ deltapoint()

long deltapoint ( Point ptA,
Point ptB 
)

deltapoint()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DeltaPoint()

long DeltaPoint ( Point  ptA,
Point  ptB 
)

Calculate distance between two points.

Parameters
aPtany Point
bPtany other point, same coordinate system
DeltaPoint returns the distance between two points, returned as a 32-bit
value with the high-order word being the vertical distance and the low-order
word being the horizontal distance.
aPtand . . .
bPtare any two points, expressed in the same coordinate system.
Returns
a 32-bit long integer; it identifies the distance between aPt and
bPt.  The high word is the vertical offset and the low word is the
horizontal offset. Negative values indicate that bPt is above and to
the left of aPt ; positive values indicate below and to the right.
Note
This performs the same function as SubPt, except the difference is given
as the returned value instead of stored into a variable.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DeviceLoop()

void DeviceLoop ( RgnHandle  drawingRgn,
DeviceLoopDrawingUPP  drawingProc,
long  userData,
DeviceLoopFlags  flags 
)

DeviceLoop()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DiffRgn()

void DiffRgn ( RgnHandle  srcRgnA,
RgnHandle  srcRgnB,
RgnHandle  dstRgn 
)

DiffRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeCCursor()

void DisposeCCursor ( CCrsrHandle  cCrsr)

DisposeCCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeColorComplementUPP()

void DisposeColorComplementUPP ( ColorComplementUPP  userUPP)

DisposeColorComplementUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeColorSearchUPP()

void DisposeColorSearchUPP ( ColorSearchUPP  userUPP)

DisposeColorSearchUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeCTable()

void DisposeCTable ( CTabHandle  cTable)

DisposeCTable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDeviceLoopDrawingUPP()

void DisposeDeviceLoopDrawingUPP ( DeviceLoopDrawingUPP  userUPP)

DisposeDeviceLoopDrawingUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeDragGrayRgnUPP()

void DisposeDragGrayRgnUPP ( DragGrayRgnUPP  userUPP)

DisposeDragGrayRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeGDevice()

void DisposeGDevice ( GDHandle  gdh)

DisposeGDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposePixMap()

void DisposePixMap ( PixMapHandle  pm)

DisposePixMap()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposePixPat()

void DisposePixPat ( PixPatHandle  pp)

DisposePixPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDArcUPP()

void DisposeQDArcUPP ( QDArcUPP  userUPP)

DisposeQDArcUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDBitsUPP()

void DisposeQDBitsUPP ( QDBitsUPP  userUPP)

DisposeQDBitsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDCommentUPP()

void DisposeQDCommentUPP ( QDCommentUPP  userUPP)

DisposeQDCommentUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDGetPicUPP()

void DisposeQDGetPicUPP ( QDGetPicUPP  userUPP)

DisposeQDGetPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDJShieldCursorUPP()

void DisposeQDJShieldCursorUPP ( QDJShieldCursorUPP  userUPP)

DisposeQDJShieldCursorUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDLineUPP()

void DisposeQDLineUPP ( QDLineUPP  userUPP)

DisposeQDLineUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDOpcodeUPP()

void DisposeQDOpcodeUPP ( QDOpcodeUPP  userUPP)

DisposeQDOpcodeUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDOvalUPP()

void DisposeQDOvalUPP ( QDOvalUPP  userUPP)

DisposeQDOvalUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDPolyUPP()

void DisposeQDPolyUPP ( QDPolyUPP  userUPP)

DisposeQDPolyUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDPrinterStatusUPP()

void DisposeQDPrinterStatusUPP ( QDPrinterStatusUPP  userUPP)

DisposeQDPrinterStatusUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeQDPutPicUPP()

void DisposeQDPutPicUPP ( QDPutPicUPP  userUPP)

DisposeQDPutPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDRectUPP()

void DisposeQDRectUPP ( QDRectUPP  userUPP)

DisposeQDRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDRgnUPP()

void DisposeQDRgnUPP ( QDRgnUPP  userUPP)

DisposeQDRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDRRectUPP()

void DisposeQDRRectUPP ( QDRRectUPP  userUPP)

DisposeQDRRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDStdGlyphsUPP()

void DisposeQDStdGlyphsUPP ( QDStdGlyphsUPP  userUPP)

DisposeQDStdGlyphsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDTextUPP()

void DisposeQDTextUPP ( QDTextUPP  userUPP)

DisposeQDTextUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeQDTxMeasUPP()

void DisposeQDTxMeasUPP ( QDTxMeasUPP  userUPP)

DisposeQDTxMeasUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeRegionToRectsUPP()

void DisposeRegionToRectsUPP ( RegionToRectsUPP  userUPP)

DisposeRegionToRectsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeRgn()

void DisposeRgn ( RgnHandle  rgn)

DisposeRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DrawPicture()

void DrawPicture ( PicHandle  myPicture,
const Rect dstRect 
)

DrawPicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EmptyRect()

Boolean EmptyRect ( const Rect r)

Determine if a rectangle is empty.

EmptyRect tests to see if a rectangle is empty; i.e., if the bottom border is
less than or equal to the top, or the right border is less than or equal to the
left.
theRectis the address of an 8-byte Rect structure.
Returns
a Boolean indicating whether the rectangle is empty . It is one of:
FALSENot empty; encloses at least one pixel
TRUEEmpty
Note
This is functionally equivalent to the following equality test:
( (theRect.bottom <= theRect.top) || (theRect.right <= theRect.left) )
When a Toolbox function returns "the empty rectangle", it returns a
rectangle with borders (0,0)(0,0). However, in this function, the
meaning is broader, including all rectangles not enclosing any pixels.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EmptyRgn()

Boolean EmptyRgn ( RgnHandle  rgn)

Determine if a Region is empty.

EmptyRgn returns an indication of whether a region is empty.
theRgnis the handle of a region, in local or global coordinates.
Returns
a Boolean value indicating whether the region is empty. It is one of:
FALSENot empty, encloses at least one pixel
TRUEEmpty
Note
Use this after performing region calculations. For instance:
SectRgn ( srcRgnA, srcRgnB, destRgn );
if ( EmptyRgn ( destRgn ) ) {. ... no intersection ...}
This is also useful after InsetRgn to see if the region has been shrunk
infinitely small. Or, you might use this to check up on GrafPort structure
fields such as visRgn or clipRgn.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ equalpt()

Boolean equalpt ( const Point pt1,
const Point pt2 
)

equalpt()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ EraseArc()

void EraseArc ( const Rect r,
short  startAngle,
short  arcAngle 
)

EraseArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EraseOval()

void EraseOval ( const Rect r)

EraseOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ErasePoly()

void ErasePoly ( PolyHandle  poly)

ErasePoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EraseRect()

void EraseRect ( const Rect r)

EraseRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EraseRgn()

void EraseRgn ( RgnHandle  rgn)

EraseRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EraseRoundRect()

void EraseRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight 
)

EraseRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillArc()

void FillArc ( const Rect r,
short  startAngle,
short  arcAngle,
const Pattern pat 
)

FillArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCArc()

void FillCArc ( const Rect r,
short  startAngle,
short  arcAngle,
PixPatHandle  pp 
)

FillCArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCOval()

void FillCOval ( const Rect r,
PixPatHandle  pp 
)

FillCOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCPoly()

void FillCPoly ( PolyHandle  poly,
PixPatHandle  pp 
)

FillCPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCRect()

void FillCRect ( const Rect r,
PixPatHandle  pp 
)

FillCRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCRgn()

void FillCRgn ( RgnHandle  rgn,
PixPatHandle  pp 
)

FillCRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillCRoundRect()

void FillCRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight,
PixPatHandle  pp 
)

FillCRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillOval()

void FillOval ( const Rect r,
const Pattern pat 
)

FillOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillPoly()

void FillPoly ( PolyHandle  poly,
const Pattern pat 
)

FillPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FillRoundRect()

void FillRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight,
const Pattern pat 
)

FillRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ForeColor()

void ForeColor ( long  color)

ForeColor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FrameArc()

void FrameArc ( const Rect r,
short  startAngle,
short  arcAngle 
)

FrameArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FrameOval()

void FrameOval ( const Rect r)

FrameOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FramePoly()

void FramePoly ( PolyHandle  poly)

FramePoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FrameRoundRect()

void FrameRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight 
)

FrameRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetBackColor()

void GetBackColor ( RGBColor color)

Obtain foreground color set in current port.

GetBackColor is used to obtain the red, green and blue, components of the
foreground color in the current port.
color is the address of either the rgbBkColor field or the global variable
QDColors , depending on whether the current port is a grafPort or a
cGrafPort.
Returns
 none
Notes :GetBackColor works regardless of whether the current port is a grafPort
or a cGrafPort. The difference is that for CGrafPort , the value comes from
the rgbBkColor field while GrafPort colors are specific values set by the
global variable QDColors . In turn, QDColors is a pointer to a table where
Quickdraw colors are stored as follows:
Value Color Red Green Blue
0 black 0x0000 0x0000 0x0000
1 yellow 0xFC00 0xF37D 0x052F
2 magenta 0xF2D7 0x0856 0x84EC
3 red 0xDD6B 0x08C2 0x06A2
4 cyan 0x0241 0xAB54 0xEAFF
5 green 0x0000 0x8000 0x11B0
6 blue 0x0000 0x0000 0xD400
7 white 0xFFFF 0xFFFF 0xFFFF
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetCCursor()

CCrsrHandle GetCCursor ( short  crsrID)

GetCCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetCPixel()

void GetCPixel ( short  h,
short  v,
RGBColor cPix 
)

Find the RGB of a specified pixel.

GetCPixel obtains the RGB of a pixel associated with a coordinate pair.
horizand . . .
vert identify the pixel in question (which hangs below and to the
right of the specified point). These are expressed in the
coordinate system of the current CGrafPort .
color is the RGB color of the pixel.
Returns
none
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetCTable()

CTabHandle GetCTable ( short  ctID)

GetCTable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetCTSeed()

long GetCTSeed ( void  )

Get unique seed value for color table.

GetCTSeed returns a seed value unique to the application's color table and is
for use in its ctSeed field.
Returns
a 32-bit long; a value greater than that stored in minSeed.
Note
GetCTSeed distinquishes the color table from the destination and ensures
proper color table translation.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetDeviceList()

GDHandle GetDeviceList ( void  )

Provides a handle to the first gDevice in the DeviceList.

GetDeviceList  can be used to show which device is first on the Device list.
Returns: a GDHandle ; a handle to the first gDevice.
Note
 A handle to the first item in the device list can be found in the
DeviceList global variable.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetForeColor()

void GetForeColor ( RGBColor color)

Obtain foreground color set in current port.

GetForeColor is used to obtain the red, green, and blue complements of the
foreground color in the current port.
color is the address of either the rgbFgColor field or the global variable
QDColors , depending on whether the current port is a grafPort or a
cGrafPort.
Returns
 none
Notes :GetForeColor works regardless of whether the current port is a grafPort
or a cGrafPort. The difference is that for CGrafPort , the value comes from
the rgbFgColor field while GrafPort colors are specific values set by the
global variable QDColors . In turn, QDColors is a pointer to a table where
Quickdraw colors are stored as follows:
Value Color Red Green Blue
0 black 0x0000 0x0000 0x0000
1 yellow 0xFC00 0xF37D 0x052F
2 magenta 0xF2D7 0x0856 0x84EC
3 red 0xDD6B 0x08C2 0x06A2
4 cyan 0x0241 0xAB54 0xEAFF
5 green 0x0000 0x8000 0x11B0
6 blue 0x0000 0x0000 0xD400
7 white 0xFFFF 0xFFFF 0xFFFF
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetGDevice()

GDHandle GetGDevice ( void  )

Get handle to current GDevice.

GetGDevice returns a handle to the current GDevice. You can use the
functions GetDeviceList and GetNextDevice to step through all devices.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetIndPattern()

void GetIndPattern ( Pattern thePat,
short  patternListID,
short  index 
)

GetIndPattern()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetMainDevice()

GDHandle GetMainDevice ( void  )

Provides a handle to the startup gDevice.

GetMainDevice  can be used to show which device is listed as the monitor with
the menu bar. GetMainDevice gets this value from the MainDevice global
variable.
Returns: a GDHandle ; a handle to the gDevice that carries the menu bar.
Note
 Contains information on the size and depth of the gDevice of the
monitor containing the menu bar. Unless a different screen has been
called out in parameter RAM as the main device, this is the screen with
its video card in the lowest-numbered slot.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetMaskTable()

Ptr GetMaskTable ( void  )

Get table of masks from ROM.

GetMaskTable returns a pointer to a ROM table containing the following
useful masks:
0x0000, 0x8000, 0xC000, 0xE000 Table of 16 right masks
0xF000, 0xF800, 0xFC00, 0xFE00
0xFF00, 0xFF80, 0xFFC0, 0xFFE0
0xFFF0, 0xFFF8, 0xFFFC, 0xFFFE
0xFFFF, 0x7FFF, 0x3FFF, 0x1FFF Table of 16 left masks
0x0FFF, 0x07FF, 0x03FF, 0x01FF
0x00FF, 0x007F, 0x003F, 0x001F
0X000F, 0x0007, 0x0003, 0x0001
0x8000, 0x4000, 0x2000, 0x1000 Table of 16 bit masks
0x0800, 0x0400, 0x0200, 0x0100
0x0080, 0x0040, 0x0020, 0x0010
0x0008, 0x0004, 0x0002, 0x0001
Returns
 a pointer to a table of 48 masks
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetMaxDevice()

GDHandle GetMaxDevice ( const Rect globalRect)

Gives a handle to device with the deepest pixMap.

Parameters
CGrafPortand 5) call SetGDevice yet again to bring back the formerly
GetMaxDevice provides a handle to the greatest pixel-depth gDevice in
the entire global rectangle.
globalRect is the rectangle in global coordinates.
Returns
a GDHandle ; a handle leading to the device in
the list with the most available colors.
Note
You can use this routine when creating an offscreen PixMap for subsequent
transfer to visible display areas. Alternatively, you might want control of a
drawing's colors, especially if it's going to be printed on a device with a
different color table than the screen. In either case, you need control of the
color and, hence, the gDevices.
In either case, if your application spans devices with varying color
capabilities, GetMaxDevice lets you use a PixMap to set up the colors to
take advantage of the best color table from among all the devices.
If you decide to use a PixMap as for a device with the greatest pixel depth,
you have to obtain an offscreen CGrafPort for that particular monitor.
What's involved in that is: 1)save the current gDevice with the GetGDevice
procedure; 2) call GetMaxDevice ; 3) use SetGDevice to make the new
choice the currently active screen; 4) call OpenCPort to create the new
CGrafPort ; and 5) call SetGDevice yet again to bring back the formerly
active gDevice. Because OpenCPort uses the global theGDevice to initialize
its PixMap the current CGrafPort and the deepest screen become one and the
same.
All of the above, however, is simply preparation. Now you get storage for
the pixels by defining the PixMap's boundaries to the image's height and
width, and setting the rowBytes to take into account the particular pixel size
being used on that device--( ( width* portPixMap ^^.pixSize )+ 15 )DIV 16
  2 --always bearing in mind that rowBytes has to be even to work at all
and a multiple of 4 to work best. Now define the interior of the PixMap by
setting portRect . The amount of storage is now height times the value of
rowBytes . If you allocate the storage as a handle, then your application can
lock the handle and place a pointer to it in the PixMap's base address.
Next, in order to draw to the CGrafPort , you save the current gDevice, set
theGDevice to be the maximum device, and restore theGDevice when the
drawing operation is complete.
After you've done all of this preparation, be sure to protect it since all of
the above can be brought to nothing if the user changes the depth of the
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetNativeWindowPort()

GrafPtr GetNativeWindowPort ( void *  nativeWindow)

GetNativeWindowPort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetNextDevice()

GDHandle GetNextDevice ( GDHandle  curDevice)

GetNextDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPattern()

PatHandle GetPattern ( short  patternID)

GetPattern()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPicture()

PicHandle GetPicture ( short  pictureID)

GetPicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPixPat()

PixPatHandle GetPixPat ( short  patID)

GetPixPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPort()

void GetPort ( GrafPtr port)

GetPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPortCustomXFerProc()

OSErr GetPortCustomXFerProc ( CGrafPtr  port,
CustomXFerProcPtr *  proc,
UInt32 *  flags,
UInt32 *  refCon 
)

GetPortCustomXFerProc()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetPortNativeWindow()

void* GetPortNativeWindow ( GrafPtr  macPort)

Find which GrafPort is currently active.

GetPort copies a pointer to the current active GrafPort into a local variable.
savePort is the address of a GrafPtr. Upon return, it will contain a copy of
the global variable thePort (i.e., a pointer to the current active
GrafPort ).
Returns
none
Note
GetPort is often used to save the value of the current GrafPort before
activating a different one. See SetPort for an example.
You may prefer to access the global variable thePort directly:
GetPort ( &savePort );
... is synonymous with ...
savePort = thePort;
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetSubTable()

void GetSubTable ( CTabHandle  myColors,
short  iTabRes,
CTabHandle  targetTbl 
)

GetSubTable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GrafDevice()

void GrafDevice ( short  device)

Set the device field for a GrafPort.

GrafDevice is used in communications between Quickdraw and the Font
Manager. It sets device-specific information that affects the way characters
are drawn.
theDevice is a device specific value. It is broken into 2 bytes as follows:
high byte device driver reference number (always negative)
low byte device-dependent modifier code
Returns
none
Note
This stores theDevice  into the device field of the current GrafPort . You
will not use this function in normal applications.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleToRgn()

void HandleToRgn ( Handle  oldRegion,
RgnHandle  region 
)

HandleToRgn()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ HiliteColor()

void HiliteColor ( const RGBColor color)

Choose new highlighting color.

HiliteColor lets you change the highlighting color used by current
cGrafPort.
RGBColor  is a record type which specifies a color's red, green, and blue
components as 16-bit unsigned integers.
Returns
none
Note
Highlight color is used whenever a drawing operation uses the highlight
transfer mode. A cGrafPort's highlight colors are initialized from the
HiliteRGB global variable stored in the port's grafVars handle.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ Index2Color()

void Index2Color ( long  index,
RGBColor aColor 
)

Find specific RGB.

Index2Color finds the RGB color that matches an indexed value on a color
table.
indexis the padded pixel value
rgbis the RGB read from the current device
Returns
none
Note
Index2Color is a color conversion procedure that finds the RGB color
that best matches a given color table index. This color does not have to be
the same color originally requested through RGBForeColor ,
RGBBackColor , SetCPixel , or Color2Index since it is the RGB that is
available from the current gDevice.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InitCPort()

void InitCPort ( CGrafPtr  port)

InitCPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InitGDevice()

void InitGDevice ( short  qdRefNum,
long  mode,
GDHandle  gdh 
)

InitGDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InitGraf()

void InitGraf ( void *  globalPtr)

InitGraf()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InitPort()

void InitPort ( GrafPtr  port)

InitPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InsetRgn()

void InsetRgn ( RgnHandle  rgn,
short  dh,
short  dv 
)

InsetRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvertArc()

void InvertArc ( const Rect r,
short  startAngle,
short  arcAngle 
)

InvertArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvertColor()

void InvertColor ( RGBColor myColor)

Find a color's complement.

InvertColor finds the RGB color that complements a specified color
theColor is an RGB's complement
Returns
none
Note
InvertColor' s default procedure for finding a color's complement is to
use the 1's complement of each component of the requested color.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvertOval()

void InvertOval ( const Rect r)

InvertOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvertPoly()

void InvertPoly ( PolyHandle  poly)

InvertPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvertRoundRect()

void InvertRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight 
)

InvertRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeColorComplementUPP()

Boolean InvokeColorComplementUPP ( RGBColor rgb,
ColorComplementUPP  userUPP 
)

InvokeColorComplementUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeColorSearchUPP()

Boolean InvokeColorSearchUPP ( RGBColor rgb,
long *  position,
ColorSearchUPP  userUPP 
)

InvokeColorSearchUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDeviceLoopDrawingUPP()

void InvokeDeviceLoopDrawingUPP ( short  depth,
short  deviceFlags,
GDHandle  targetDevice,
long  userData,
DeviceLoopDrawingUPP  userUPP 
)

InvokeDeviceLoopDrawingUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDragGrayRgnUPP()

void InvokeDragGrayRgnUPP ( DragGrayRgnUPP  userUPP)

InvokeDragGrayRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDArcUPP()

void InvokeQDArcUPP ( GrafVerb  verb,
const Rect r,
short  startAngle,
short  arcAngle,
QDArcUPP  userUPP 
)

InvokeQDArcUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDBitsUPP()

void InvokeQDBitsUPP ( const BitMap srcBits,
const Rect srcRect,
const Rect dstRect,
short  mode,
RgnHandle  maskRgn,
QDBitsUPP  userUPP 
)

InvokeQDBitsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDCommentUPP()

void InvokeQDCommentUPP ( short  kind,
short  dataSize,
Handle  dataHandle,
QDCommentUPP  userUPP 
)

InvokeQDCommentUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDGetPicUPP()

void InvokeQDGetPicUPP ( void *  dataPtr,
short  byteCount,
QDGetPicUPP  userUPP 
)

InvokeQDGetPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDJShieldCursorUPP()

void InvokeQDJShieldCursorUPP ( short  left,
short  top,
short  right,
short  bottom,
QDJShieldCursorUPP  userUPP 
)

InvokeQDJShieldCursorUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDLineUPP()

void InvokeQDLineUPP ( Point  newPt,
QDLineUPP  userUPP 
)

InvokeQDLineUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDOpcodeUPP()

void InvokeQDOpcodeUPP ( const Rect fromRect,
const Rect toRect,
UInt16  opcode,
SInt16  version,
QDOpcodeUPP  userUPP 
)

InvokeQDOpcodeUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDOvalUPP()

void InvokeQDOvalUPP ( GrafVerb  verb,
const Rect r,
QDOvalUPP  userUPP 
)

InvokeQDOvalUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDPolyUPP()

void InvokeQDPolyUPP ( GrafVerb  verb,
PolyHandle  poly,
QDPolyUPP  userUPP 
)

InvokeQDPolyUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDPrinterStatusUPP()

OSStatus InvokeQDPrinterStatusUPP ( PrinterStatusOpcode  opcode,
CGrafPtr  currentPort,
void *  printerStatus,
QDPrinterStatusUPP  userUPP 
)

InvokeQDPrinterStatusUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeQDPutPicUPP()

void InvokeQDPutPicUPP ( const void *  dataPtr,
short  byteCount,
QDPutPicUPP  userUPP 
)

InvokeQDPutPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDRectUPP()

void InvokeQDRectUPP ( GrafVerb  verb,
const Rect r,
QDRectUPP  userUPP 
)

InvokeQDRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDRgnUPP()

void InvokeQDRgnUPP ( GrafVerb  verb,
RgnHandle  rgn,
QDRgnUPP  userUPP 
)

InvokeQDRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDRRectUPP()

void InvokeQDRRectUPP ( GrafVerb  verb,
const Rect r,
short  ovalWidth,
short  ovalHeight,
QDRRectUPP  userUPP 
)

InvokeQDRRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDStdGlyphsUPP()

OSStatus InvokeQDStdGlyphsUPP ( void *  dataStream,
ByteCount  size,
QDStdGlyphsUPP  userUPP 
)

InvokeQDStdGlyphsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDTextUPP()

void InvokeQDTextUPP ( short  byteCount,
const void *  textBuf,
Point  numer,
Point  denom,
QDTextUPP  userUPP 
)

InvokeQDTextUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeQDTxMeasUPP()

short InvokeQDTxMeasUPP ( short  byteCount,
const void *  textAddr,
Point numer,
Point denom,
FontInfo info,
QDTxMeasUPP  userUPP 
)

InvokeQDTxMeasUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeRegionToRectsUPP()

OSStatus InvokeRegionToRectsUPP ( UInt16  message,
RgnHandle  rgn,
const Rect rect,
void *  refCon,
RegionToRectsUPP  userUPP 
)

InvokeRegionToRectsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsValidPort()

Boolean IsValidPort ( CGrafPtr  port)

IsValidPort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ KillPicture()

void KillPicture ( PicHandle  myPicture)

KillPicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ KillPoly()

void KillPoly ( PolyHandle  poly)

KillPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ Line()

void Line ( short  dh,
short  dv 
)

Line()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetCursorNew()

Boolean LMGetCursorNew ( void  )

LMGetCursorNew()

Availability:

Non-Carbon CFM: in InterfaceLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetDeviceList()

GDHandle LMGetDeviceList ( void  )

LMGetDeviceList()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetFractEnable()

UInt8 LMGetFractEnable ( void  )

LMGetFractEnable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetHiliteMode()

UInt8 LMGetHiliteMode ( void  )

LMGetHiliteMode()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetHiliteRGB()

void LMGetHiliteRGB ( RGBColor hiliteRGBValue)

LMGetHiliteRGB()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetLastFOND()

Handle LMGetLastFOND ( void  )

LMGetLastFOND()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetLastSPExtra()

SInt32 LMGetLastSPExtra ( void  )

LMGetLastSPExtra()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetMainDevice()

GDHandle LMGetMainDevice ( void  )

LMGetMainDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetQDColors()

Handle LMGetQDColors ( void  )

LMGetQDColors()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetScrHRes()

SInt16 LMGetScrHRes ( void  )

LMGetScrHRes()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetScrVRes()

SInt16 LMGetScrVRes ( void  )

LowMem accessor functions previously in LowMem.h LMGetScrVRes()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetTheGDevice()

GDHandle LMGetTheGDevice ( void  )

LMGetTheGDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetWidthListHand()

Handle LMGetWidthListHand ( void  )

LMGetWidthListHand()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetWidthPtr()

Ptr LMGetWidthPtr ( void  )

LMGetWidthPtr()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMGetWidthTabHandle()

Handle LMGetWidthTabHandle ( void  )

LMGetWidthTabHandle()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetCursorNew()

void LMSetCursorNew ( Boolean  value)

LMSetCursorNew()

Availability:

Non-Carbon CFM: in InterfaceLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetDeviceList()

void LMSetDeviceList ( GDHandle  value)

LMSetDeviceList()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetFractEnable()

void LMSetFractEnable ( UInt8  value)

LMSetFractEnable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetHiliteMode()

void LMSetHiliteMode ( UInt8  value)

LMSetHiliteMode()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetHiliteRGB()

void LMSetHiliteRGB ( const RGBColor hiliteRGBValue)

LMSetHiliteRGB()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetLastFOND()

void LMSetLastFOND ( Handle  value)

LMSetLastFOND()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetLastSPExtra()

void LMSetLastSPExtra ( SInt32  value)

LMSetLastSPExtra()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetMainDevice()

void LMSetMainDevice ( GDHandle  value)

LMSetMainDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetQDColors()

void LMSetQDColors ( Handle  value)

LMSetQDColors()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetScrHRes()

void LMSetScrHRes ( SInt16  value)

LMSetScrHRes()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetScrVRes()

void LMSetScrVRes ( SInt16  value)

LMSetScrVRes()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetTheGDevice()

void LMSetTheGDevice ( GDHandle  value)

LMSetTheGDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetWidthListHand()

void LMSetWidthListHand ( Handle  value)

LMSetWidthListHand()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetWidthPtr()

void LMSetWidthPtr ( Ptr  value)

LMSetWidthPtr()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LMSetWidthTabHandle()

void LMSetWidthTabHandle ( Handle  value)

LMSetWidthTabHandle()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ LockPortBits()

OSErr LockPortBits ( GrafPtr  port)

These are Carbon only routines. They do nothing at all on Mac OS 8, but work flawlessly on Mac OS X. LockPortBits()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacCopyRgn()

void MacCopyRgn ( RgnHandle  srcRgn,
RgnHandle  dstRgn 
)

[Mac]CopyRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacEqualRect()

Boolean MacEqualRect ( const Rect rect1,
const Rect rect2 
)

[Mac]EqualRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacEqualRgn()

Boolean MacEqualRgn ( RgnHandle  rgnA,
RgnHandle  rgnB 
)

[Mac]EqualRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacFillRect()

void MacFillRect ( const Rect r,
const Pattern pat 
)

[Mac]FillRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacFillRgn()

void MacFillRgn ( RgnHandle  rgn,
const Pattern pat 
)

[Mac]FillRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacFrameRect()

void MacFrameRect ( const Rect r)

[Mac]FrameRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacFrameRgn()

void MacFrameRgn ( RgnHandle  rgn)

[Mac]FrameRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacGetCursor()

CursHandle MacGetCursor ( short  cursorID)

[Mac]GetCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacGetPixel()

Boolean MacGetPixel ( short  h,
short  v 
)

[Mac]GetPixel()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacInsetRect()

void MacInsetRect ( Rect r,
short  dh,
short  dv 
)

[Mac]InsetRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacInvertRect()

void MacInvertRect ( const Rect r)

[Mac]InvertRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacInvertRgn()

void MacInvertRgn ( RgnHandle  rgn)

[Mac]InvertRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacLineTo()

void MacLineTo ( short  h,
short  v 
)

[Mac]LineTo()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacOffsetRect()

void MacOffsetRect ( Rect r,
short  dh,
short  dv 
)

[Mac]OffsetRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacOffsetRgn()

void MacOffsetRgn ( RgnHandle  rgn,
short  dh,
short  dv 
)

[Mac]OffsetRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacPaintRgn()

void MacPaintRgn ( RgnHandle  rgn)

[Mac]PaintRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacPtInRect()

Boolean MacPtInRect ( Point  pt,
const Rect r 
)

[Mac]PtInRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacRegionToNativeRegion()

void* MacRegionToNativeRegion ( RgnHandle  macRegion)

MacRegionToNativeRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ MacSetPort()

void MacSetPort ( GrafPtr  port)

[Mac]SetPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacSetRect()

void MacSetRect ( Rect r,
short  left,
short  top,
short  right,
short  bottom 
)

[Mac]SetRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacSetRectRgn()

void MacSetRectRgn ( RgnHandle  rgn,
short  left,
short  top,
short  right,
short  bottom 
)

[Mac]SetRectRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacUnionRect()

void MacUnionRect ( const Rect src1,
const Rect src2,
Rect dstRect 
)

[Mac]UnionRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacUnionRgn()

void MacUnionRgn ( RgnHandle  srcRgnA,
RgnHandle  srcRgnB,
RgnHandle  dstRgn 
)

[Mac]UnionRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacXorRgn()

void MacXorRgn ( RgnHandle  srcRgnA,
RgnHandle  srcRgnB,
RgnHandle  dstRgn 
)

[Mac]XorRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MakeITable()

void MakeITable ( CTabHandle  cTabH,
ITabHandle  iTabH,
short  res 
)

MakeITable()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MakeRGBPat()

void MakeRGBPat ( PixPatHandle  pp,
const RGBColor myColor 
)

Provides best possible RGB match on current device.

MakeRGBPat generates a pixPat that approximates the requested color.
thePpat is the handle of the pixel pattern to create in memory.
myColor is the closest match to the requested RGB currently available.
Returns
none
Note
MakeRGBPat generates the closest possible color match to the requested
RGB, given the current equipment.  On a device with 4 bits per pixel,
MakeRGBPat will yield 125 possible colors -- as opposed to 16 colors
on the same device if you'd just set the foreground color and commenced
drawing.
MakeRGBPat makes more colors theoretically possible by alternating
between four colors in a pattern.  While this gives you an increased range
of colors, the alternating color selection doesn't allow for a very solid
pattern and should be avoided when using elements that are one pixel wide.
Each 8-by-8 pattern component is composed of computed colors. Colors
are arranged in an RGB pattern as follows (with pattern map boundary
always containing (0,0,8,8) and the rowbytes equal to 2:
01
23
Value RGB
0computed RGB color
1computed RGB color
2computed RGB color
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MapPoly()

void MapPoly ( PolyHandle  poly,
const Rect srcRect,
const Rect dstRect 
)

Scale and reposition a polygon.

MapPoly resizes and repositions a polygon, converting its coordinates by the
size-ratio and offset of two rectangles. Use this to scale and reposition a
polygon.
thePoly is a handle leading to a variable-length Polygon structure. On
entry, it describes a polygon within srcRect that you wish to remap.
Upon return, all its vertex coordinates have been recalculated
relative to the size and position of destRect .
srcRect and . . .
destRect are the addresses of two 8-byte Rect structures.  For typical
operations, thePoly is enclosed by srcRect . It gets mapped to a
similar position within destRect .
Returns
none
Note
Use this function to resize and reposition a polygon that you wish to expand
or shrink as you move it from one rectangular area to another (typically
smaller or larger) one.

srcRect destRect
thePoly is expanded or shrunk by the ratio of the sizes of srcRect and
destRect. It is moved to a similarly-located position within destRect . This
is a purely mathematical operation and has no effect on the screen unless
thePoly is subsequently drawn or filled.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MapRect()

void MapRect ( Rect r,
const Rect srcRect,
const Rect dstRect 
)

Scale and reposition a rectangle.

MapRect maps the corner points of a rectangle, converting them by a size
ratio and offset of two other rectangles. Use this to scale or reposition an
object that is being moved to a larger or smaller rectangle.
theRectis the address of an 8-byte Rect structure. On entry, it describes a
rectangle within srcRect that you wish to remap. Upon return, its
corner points have been recalculated relative to the size and position
of destRect .
srcRect and . . .
destRect are the addresses of two 8-byte Rect structures.  For typical
operations, theRect is an element of an object enclosed by srcRect .
It gets mapped to a similar position within destRect .
Returns
none
Note
Use this function to resize and reposition a rectangle that you wish to
expand or shrink as you move it from one rectangular area to another
(typically smaller or larger) one.
theRect is expanded or shrunk by the ratio of the sizes of srcRect and
destRect. It is moved to a similarly-located position within destRect . This
is a purely mathematical operation and has no effect on the screen until
theRect is subsequently drawn or filled.
This call is functionally equivalent to:
MapPt( & topleft(theRect), &srcRect, &destRect );
MapPt( & bottomRight(theRect), &srcRect, &destRect );
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MapRgn()

void MapRgn ( RgnHandle  rgn,
const Rect srcRect,
const Rect dstRect 
)

MapRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ Move()

void Move ( short  dh,
short  dv 
)

the pen relative to its current location

Move moves the pen a specified distance from its current location. It does not
perform any drawing.
distHoriz is the distance, in pixels, to move the pen horizontally. Positive
values move to the right; negative to the left.
distVert is the distance, in pixels, to move the pen vertically. Positive
values move down; negative move up.
Returns
none
Note
MoveTo is functionally identical to:
MoveTo ( thePort->pnLoc.h+distHoriz , thePort->pnLoc.v+distVert );
This does not do any drawing. Use Line or LineTo draw as the pen is
moved.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MoveTo()

void MoveTo ( short  h,
short  v 
)

Set pen location without drawing.

MoveTo moves the pen to the specified location, in local coordinates. This
does no drawing.
horizand . . .
vertare a location in local coordinates of the current GrafPort .
Returns
none
Note
The pen is repositioned at the selected point without performing any
drawing. The position is "absolute" as it relates to the origin of the current
GrafPort . Use Move to move the pen to a position relative to its current
position.
Use Line or LineTo to draw a line as the pen is moved.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ myCommentProc()

pascal short myCommentProc ( void  )

Set graphProcs field to point to custom routines.

SetStdProcs stores the addresses of the standard Quickdraw procedures into
a structure intended to be used in a GrafPort .
ll_procs is the address of a 52-byte QDProcs structure. Upon return, all
fields of the structure have been set to contain the addresses of the
standard low-level routines used by Quickdraw.
Returns
none
Note
SetStdProcs is used by applications that want to intercept selected
low-level routines (e.g., the picture-comment handler) while continuing
to use the other standard routines.
Since Quickdraw lives up to its name, most applications won't need to
replace its code. If you do wish to install a custom Quickdraw function
handler (sometimes called a "bottleneck" routine), follow these steps:
•Create a function that accepts the same parameters in the same order as
one of Quickdraw's StdXxx functions.
•Open a GrafPort (OpenPort or NewWindow )
•Create a standard QDProcs structure by allocating it and then using
SetStdProcs to initialize it.
•Store the address of your custom procedure into the appropriate field of
the QDProcs structure.
•Store the address of your QDProcs structure into the grafProcs field of
the desired GrafPort .
Now, when your application invokes a Quickdraw function that passes
through the intercepted bottleneck, your custom handler will get control.
You need not replace all the functionality of a bottleneck-you may choose to
simply pre-process the parameters passed to you and then invoke the
original handler, as illustrated in the following example:
Example
#include < Quickdraw.h >
#define MY_COMMENT 1234
QDProcs myQDProcs; /* uninitialized data structure 

◆ NativeRegionToMacRegion()

RgnHandle NativeRegionToMacRegion ( void *  nativeRegion)

NativeRegionToMacRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ NewColorComplementUPP()

ColorComplementUPP NewColorComplementUPP ( ColorComplementProcPtr  userRoutine)

NewColorComplementUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewColorSearchUPP()

ColorSearchUPP NewColorSearchUPP ( ColorSearchProcPtr  userRoutine)

NewColorSearchUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDeviceLoopDrawingUPP()

DeviceLoopDrawingUPP NewDeviceLoopDrawingUPP ( DeviceLoopDrawingProcPtr  userRoutine)

NewDeviceLoopDrawingUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDragGrayRgnUPP()

DragGrayRgnUPP NewDragGrayRgnUPP ( DragGrayRgnProcPtr  userRoutine)

NewDragGrayRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewGDevice()

GDHandle NewGDevice ( short  refNum,
long  mode 
)

NewGDevice()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewPixMap()

PixMapHandle NewPixMap ( void  )

NewPixMap()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewPixPat()

PixPatHandle NewPixPat ( void  )

NewPixPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDArcUPP()

QDArcUPP NewQDArcUPP ( QDArcProcPtr  userRoutine)

NewQDArcUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDBitsUPP()

QDBitsUPP NewQDBitsUPP ( QDBitsProcPtr  userRoutine)

NewQDBitsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDCommentUPP()

QDCommentUPP NewQDCommentUPP ( QDCommentProcPtr  userRoutine)

NewQDCommentUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDGetPicUPP()

QDGetPicUPP NewQDGetPicUPP ( QDGetPicProcPtr  userRoutine)

NewQDGetPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDJShieldCursorUPP()

QDJShieldCursorUPP NewQDJShieldCursorUPP ( QDJShieldCursorProcPtr  userRoutine)

NewQDJShieldCursorUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDLineUPP()

QDLineUPP NewQDLineUPP ( QDLineProcPtr  userRoutine)

NewQDLineUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDOpcodeUPP()

QDOpcodeUPP NewQDOpcodeUPP ( QDOpcodeProcPtr  userRoutine)

NewQDOpcodeUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDOvalUPP()

QDOvalUPP NewQDOvalUPP ( QDOvalProcPtr  userRoutine)

NewQDOvalUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDPolyUPP()

QDPolyUPP NewQDPolyUPP ( QDPolyProcPtr  userRoutine)

NewQDPolyUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDPrinterStatusUPP()

QDPrinterStatusUPP NewQDPrinterStatusUPP ( QDPrinterStatusProcPtr  userRoutine)

NewQDPrinterStatusUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ NewQDPutPicUPP()

QDPutPicUPP NewQDPutPicUPP ( QDPutPicProcPtr  userRoutine)

NewQDPutPicUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDRectUPP()

QDRectUPP NewQDRectUPP ( QDRectProcPtr  userRoutine)

NewQDRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDRgnUPP()

QDRgnUPP NewQDRgnUPP ( QDRgnProcPtr  userRoutine)

NewQDRgnUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDRRectUPP()

QDRRectUPP NewQDRRectUPP ( QDRRectProcPtr  userRoutine)

NewQDRRectUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDStdGlyphsUPP()

QDStdGlyphsUPP NewQDStdGlyphsUPP ( QDStdGlyphsProcPtr  userRoutine)

NewQDStdGlyphsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDTextUPP()

QDTextUPP NewQDTextUPP ( QDTextProcPtr  userRoutine)

NewQDTextUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewQDTxMeasUPP()

QDTxMeasUPP NewQDTxMeasUPP ( QDTxMeasProcPtr  userRoutine)

NewQDTxMeasUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewRegionToRectsUPP()

RegionToRectsUPP NewRegionToRectsUPP ( RegionToRectsProcPtr  userRoutine)

NewRegionToRectsUPP()

Availability:

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewRgn()

RgnHandle NewRgn ( void  )

NewRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OffScreenDraw()

The third line above correctly adjusts for the required word alignment Example OffScreenDraw ( short  rWide,
short  rHigh,
Rect  rDest 
)

Assigns a new bit map to the active GrafPort.

SetPortBits replaces the portBits field of the active GrafPort with a new
value, effectively changing the entire contents of the port.
Returns
none
Note
SetPortBits is useful for performing off-screen drawing. For instance,
you can use a series of Quickdraw calls to create an image in an off-screen
memory buffer, then use CopyBits to copy the bit-mapped image into the
normal screen.
Be sure that newBitMap  is fully prepared before using this call; that is,
the memory for the bit-image has been allocated and the baseAddr ,
rowBytes , and bounds fields have been set up.
Note that BitMap.rowBytes must be an even number and that it must be as
large or larger, in bits, than the width of the BitMap.bounds. The total
amount of memory needed for the off-screen bitMap is the product of the
height of the rectangle times the bytes-per-row. Here's a formula that
performs the calculation:
rectHigh = bounds.bottom - bounds.top;
rectWide = bounds.right - bounds.left;
rowBytes = ((rectWide -1) / 16) + 1) * 2;
buffSize = rowBytes * rectHigh; /* size in bytes 

Change height and width of current GrafPort

PortSize modifies the width and height of the current GrafPort 's portRect .
It is normally called by the Window Manager for window-sizing functions.
newWidth and . . .
newHeight are the desired width and height for the portRect.
Returns
none
Note
This is a simple way to extend the size of the current port's portRect - the
active area of the current GrafPort .
The portRect.top and portRect.left fields stay the same. The portRect.right
and portRect.bottom change to reflect the desired newWidth  and newHeight .
Note that this does not affect other fields of the GrafPort ; drawing continues
to be clipped to the intersection of portRect , visRgn, and clipRgn.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

Change position of top-left corner of portRect

MovePortTo repositions the portRect of the current GrafPort . It is used by
the Window Manager to reposition windows.
leftGlobal and . . .
topGlobal are the desired coordinates for the top and left fields of the
GrafPort 's portRect .
Returns
none
Note
This changes the position at which subsequent drawing will appear for the
active GrafPort . It effectively moves the active area of the GrafPort by
adding offsets to all fields of the portRect such that the top-left corner is
moved to the global coordinate pair leftGlobal , topGlobal . The height and
width of the portRect remain the same and the local coordinate system is not
changed.
As with PortSize , this does not affect other fields of the GrafPort ;
drawing continues to be clipped to the intersection of portRect , visRgn, and
clipRgn.
Unlike SetOrigin , this has no effect on the local coordinate system. It
moves the port to a different part of the BitMap.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

SetOrigin()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

SetClip()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

GetClip()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

ClipRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

BackPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

Initialize cursor to the standard arrow

InitCursor sets the cursor shape to the standard arrow cursor and sets the
cursor level to 0, making it visible. It is normally called once, in the early
part of a program.
Returns
none
Note
The 68-byte Cursor structure for the standard arrow cursor can be found
in the Quickdraw data area. Its symbolic name is arrow.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

[Mac]SetCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
\brief Remove the mouse cursor from the screen

<pre>
Note
Each use of HideCursor must be balanced with a subsequent call to
ShowCursor .
This call decrements the cursor level: the cursor level is set to 0 when you
call InitCursor , and is decremented by each call to HideCursor and
incremented by each call to ShowCursor . It is visible only when the
cursor level is at 0.
An alternative to this call, ShieldCursor , hides the cursor only if it is
currently positioned within a specified rectangle.
A related function, ObscureCursor , hides the cursor until the mouse is
moved.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

[Mac]ShowCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

Hide cursor until mouse moves

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
\brief Make subsequent pen motion invisible

<pre>HidePen decrements the "pen level". If the level is set to a value other than

0, the pen is hidden and subsequent draw operations are not visible.

Returns
none
Note
HidePen manipulates the pnVis field of the current GrafPort . Using
HidePen decrements the field and ShowPen increments it. When pnVis
is not equal 0, then the pen is hidden and drawing functions ( LineTo,
FrameRect , etc.) do not affect the BitMap. The pnVis field is set to 0
when the GrafPort is initialized.
The decrement/increment system makes it easy to nest drawing functions.
Always balance a HidePen call with ShowPen , and vice versa.
You can get the current "pen level" by reading the field directly from the
GrafPort structure. Note that it is not a Boolean field; the pen is visible
only when pnVis==0.
The OpenRgn , OpenPicture , and OpenPoly functions automatically call
HidePen so, by default, subsequent drawing activities are hidden.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
\brief Balance a previous HidePen ; make pen visible

<pre>HidePen decrements the field and ShowPen increments it. When the

pnVis field is not equal 0, the pen is hidden and drawing functions ( LineTo, FrameRect , etc.) do not affect the bitMap. The pnVis field is set to 0 (visible) when the GrafPort is initialized. The decrement/increment system makes it easy to nest drawing functions. Always balance a HidePen call with ShowPen , and vice versa. You can get the current "pen level" by reading the pnVis field directly from the GrafPort structure. Note that it is not a Boolean field; the pen is visible only when pnVis == 0. The CloseRgn , ClosePicture , and ClosePoly functions automatically call ShowPen to balance the previous automatic call to HidePen .

Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
\brief Obtain current pen position

<pre>GetPen obtains the current pen position, in local coordinates.

penPtis the address of a 4-byte Point structure. Upon return, it will contain the pen position of the current GrafPort , in local coordinates.

Returns
none
Note
This stores the Point into a local variable, e.g.:
PointthePt;
GetPen( &thePt );
You can obtain this and other pen-related information via GetPenState .
You can position the pen via MoveTo .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
\brief Obtain current location, size, and mode of pen

<pre>GetPenState fills a structure with pen-related information, including the

pen location, size, transfer mode, and pattern. It is useful in writing nested drawing functions. thePnState is the address of an 18-byte PenState structure. Upon return, the structure is filled with information about the pen of the current GrafPort .

Returns
none
Note
The PenState structure receives information copied directly from the
current GrafPort ; pnLoc, pnSize, pnMode, and pnPat.
Nested drawing procedures can use this function to obtain the current
status of the pen, in order to restore the state later. This may be coupled
with ShowPen ...HidePen to fully implement invisible nesting.
Example
#include < Quickdraw.h >
DrawSomething()
{
PenState savePenState;
GetPenState ( &savePenState ); /* save current state 
 

◆ OffsetPoly()

void OffsetPoly ( PolyHandle  poly,
short  dh,
short  dv 
)

Move a polygon.

OffsetPoly modifies a polygon's definition, moving it in any direction on the
coordinate plane. Note that this does not have any visible effect on the screen,
until such time as the polygon is drawn or filled.
thePoly is a handle leading to a variable-length Polygon structure. It is
typically a value obtained via OpenPoly .
distHoriz specifies the horizontal distance, in pixels, to move the polygon.
Positive values move to the right; negative to the left.
distVert specifies the vertical distance, in pixels, to move the polygon.
Positive values move downward; negative upward.
Returns
none
Note
The polygon retains its shape and size. Use MapPoly to shrink or expand
the polygon.
This is an especially efficient operation, since it changes only the value in
the polyBBox field of the Polygon structure; all endpoints that make up the
bulk of the data are stored relative to first point.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpColor()

void OpColor ( const RGBColor color)

Set RGB values used by addPin, subPin and blend modes.

OpColor sets the red, green, and blue values used by addPin, subPin, and
blend modes.
RGBColor  is a record type which specifies a color's red, green,
and blue components as 16-bit unsigned integers.
Returns
none
Note
This sets drawing mode color values, which are stored in the grafVars
handle in the CGrafPort . This procedure will have no effect unless the
current port is a cGrafPort.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpenCPicture()

PicHandle OpenCPicture ( const OpenCPicParams newHeader)

OpenCPicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpenCPort()

void OpenCPort ( CGrafPtr  port)

OpenCPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OpenCursorComponent()

OSErr OpenCursorComponent ( Component  c,
ComponentInstance ci 
)

OpenCursorComponent()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpenPicture()

PicHandle OpenPicture ( const Rect picFrame)

OpenPicture()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpenPoly()

PolyHandle OpenPoly ( void  )

OpenPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OpenPort()

void OpenPort ( GrafPtr  port)

OpenPort()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OpenRgn()

void OpenRgn ( void  )

OpenRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintArc()

void PaintArc ( const Rect r,
short  startAngle,
short  arcAngle 
)

PaintArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintOval()

void PaintOval ( const Rect r)

PaintOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintPoly()

void PaintPoly ( PolyHandle  poly)

PaintPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintRect()

void PaintRect ( const Rect r)

PaintRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintRoundRect()

void PaintRoundRect ( const Rect r,
short  ovalWidth,
short  ovalHeight 
)

PaintRoundRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PenMode()

void PenMode ( short  mode)

Set the graphics pen pattern transfer mode.

PenMode selects the pattern transfer mode to be used in pen drawing and
painting operations.
newPnMode is a short and may be one of the following constants defined in
Quickdraw.h :
patCopy 8overwrite background entirely
patOr9overwrite where pattern is black
patXor10invert where pattern and bkgd are both black
patBic11force white where pattern is black
notPatCopy 12invert pattern, then patCopy
notPatOr 13invert pattern, then patOr
notPatXor 14invert pattern, then patXor
notPatBic 15invert pattern, then patBic
Returns
none
Note
This function modifies the pnMode field of the current GrafPort structure.
It affects all drawing operations such as LineTo and FrameRect , as well
as painting operations such as PaintOval , PaintRoundRect , etc.
See Transfer Modes for a graphic depiction of the effect of the various
pen modes.
You can obtain the current setting by accessing the pnMode field of a
GrafPort :
curPnMode = thePort->pnMode;
This function does not affect how text is drawn. Use TextMode to modify
the text-drawing pen's transfer mode.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PenNormal()

void PenNormal ( void  )

PenNormal()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PenPat()

void PenPat ( const Pattern pat)

PenPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PenPixPat()

void PenPixPat ( PixPatHandle  pp)

PenPixPat()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PenSize()

void PenSize ( short  width,
short  height 
)

Set dimensions of pen for current GrafPort.

PenSize selects the height and width, in pixels, of the graphics pen for the
current GrafPort . The initial pen size is (1,1).
wideand . . .
highare the desired width and height of the pen. A setting of (0,0) - or
setting either parameter less than 0 - makes the pen invisible
Returns
none
Note
The wide and high values are stored in pnSize field of the current
GrafPort structure, except that if either value is less than 0, then both
parts of pnSize are set to 0, making the pen invisible.
You can also set the pen size and other pen-related parameters via the
SetPenState function. You can may obtain the size of the pen by accessing
the pnSize field of the current GrafPort ; e.g.:
short width, height;
width = thePort -> pnSize.h;
height = thePort -> pnSize.v;
You can obtain this and related information via GetPenState .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PicComment()

void PicComment ( short  kind,
short  dataSize,
Handle  dataHandle 
)

PicComment()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ProtectEntry()

void ProtectEntry ( short  index,
Boolean  protect 
)

Protect or un-protect color table entry.

ProtectEntry is used by the Color Manager to provide protection or remove
protection from a color table entry.
indexis the identification of the entry to be affected by this procedure.
protectFlag specifies whether to protect the entry or remove its protection . It
must be one of:
FALSEremove protection from any specified entry
TRUEprotect entry, returns a protection error if entry is already
protected.
Returns
none
Note
Once an entry is protected, other clients cannot affect it.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ pt2rect()

void pt2rect ( const Point pt1,
const Point pt2,
Rect destRect 
)

pt2rect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ Pt2Rect()

void Pt2Rect ( Point  pt1,
Point  pt2,
Rect dstRect 
)

Find smallest rectangle enclosing two points.

Pt2Rect determines the coordinates of the smallest rectangle that will
enclose the pixels represented by two points.
pt1and . . .
pt2are any two 4-byte Point structures.
resultRect is the address of an 8-byte Rect structure. Upon return it will
contain the coordinates of a rectangle that encloses pt1 and pt2 .
Returns
none
Note
If pt1 or pt2 have the same horizontal or vertical coordinate resultRect
is set to the empty rectangle (0,0)(0,0).
The points may be in any order. The points are stored into the correct part
of the Rect structure; i.e., the highest vertical coordinate of either point is
stored as resultRect.top, and so forth.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ptinrect()

Boolean ptinrect ( const Point pt,
const Rect r 
)

ptinrect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ptinrgn()

Boolean ptinrgn ( const Point pt,
RgnHandle  rgn 
)

ptinrgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ pttoangle()

void pttoangle ( const Rect r,
const Point pt,
short *  angle 
)

pttoangle()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PtToAngle()

void PtToAngle ( const Rect r,
Point  pt,
short *  angle 
)

Obtain angle between point and rectangle center.

PtToAngle determines an angular measure between the vertical center of a
rectangle and a specified point.
theRectis the address of an 8-byte Rect structure.
thePtis a point, in the same coordinate system as theRect .
angleis the address of an integer. Upon return, it will contain an angle
measured from a line extending from the center of theRect to the
middle of its top line. See the diagram, below.
Returns
none
Note
This can be used to obtain an angle value for use in any of the arc paint and
fill functions that require an angle parameter.
The angle is not a true mathematical angle in circular degrees; as with arc
and wedge functions, all angles are based on the corners of a rectangle as
shown:
Thus, the angles are distorted to match the shape of the rectangle. For
instance:

In the figures, both "angles" are 45 °, even though the one on the right is
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ QDAddRectToDirtyRegion()

OSStatus QDAddRectToDirtyRegion ( CGrafPtr  inPort,
const Rect inBounds 
)

QDAddRectToDirtyRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.0 and later

◆ QDAddRegionToDirtyRegion()

OSStatus QDAddRegionToDirtyRegion ( CGrafPtr  inPort,
RgnHandle  inRegion 
)

QDAddRegionToDirtyRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.0 and later

◆ QDBeginCGContext()

OSStatus QDBeginCGContext ( CGrafPtr  inPort,
CGContextRef *  outContext 
)

QDBeginCGContext()

Summary: Allow CoreGraphics drawing in a CGrafPort

Discussion: So far, CreateCGContextForPort() was used to create a CGContext for CG drawing from a CGrafPort. However, if the current port is a printing port, the CreateCGContextForPort fails; consequently, there was no way to mix Quickdraw and CoreGraphics drawing and still print it. If, instead, the CoreGraphics drawing is bracketed by QDBeginCGContext/QDEndCGContext calls, the drawing will also appear in print. There are some restrictions on the usage of QDBeginCGContext/QDEndCGContext:

  • Between QDBeginCGContext and QDEndCGContext, Quickdraw drawing is disabled; only CoreGraphics drawing is allowed
  • QDBeginCGContext/QDEndCGContext calls can not be nested
  • QDEndCGContext releases the CGContext returned from QDBeginCGContext and sets it to NULL.

Parameters:

inPort: The current port

outContext: The CGContextRef to be used for CG drawing

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
Mac OS X: in version 10.1 and later

◆ QDDisplayWaitCursor()

void QDDisplayWaitCursor ( Boolean  forceWaitCursor)

In Mac OS X, developers should be able to turn the WaitCursor (spinning wheel) on and off. QDDisplayWaitCursor() keeps track of nested calls. Passing FALSE will resume automatic wait cursor operation. Call this function only from an application in the foreground. QDDisplayWaitCursor()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
Mac OS X: in version 10.0 and later

◆ QDDisposeRegionBits()

OSStatus QDDisposeRegionBits ( QDRegionBitsRef  regionBits)

QDDisposeRegionBits()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.1 and later

◆ QDEndCGContext()

OSStatus QDEndCGContext ( CGrafPtr  inPort,
CGContextRef *  inoutContext 
)

QDEndCGContext()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.1 and later
Mac OS X: in version 10.1 and later

◆ QDError()

short QDError ( void  )

Return error result from last QuickDraw call.

The QDError function, introduced with Color QuickDraw  returns the
error result from the last Color QuickDraw or Color Manager call. It has
a number of new result codes, and it has also been modified so that it does not
fail on a black-and-white system (where it always returns FALSE). Its format
is the same:
Returns
the error result from the last Color QuickDraw or
Color Manager call
Note
QuickDraw uses stack space for work buffers. For complex operations
such as depth conversion, dithering, and image resizing, stack space may
not be sufficient. Color QuickDraw now attempts to get temporary
memory from other parts of the system. If that is still not enough, QDError
returns this code:
mfStackErr (-149)Insufficient stack
If your application receives this result code, divide the operation-for
example, divide the image into left and right halves-and try again.
When you record drawing operations in an open region, the resulting region
description may overflow the 64 KB limit. Should this happen, QDError
returns -147.
regionTooBigError (-147)Region too big or complex
Since the resulting region is potentially corrupt, the closeRgn procedure
returns an empty region if it detects QDError has been set to -147. A similar
error can occur during conversion of a bitmap to a region.
rgnTooBigErr (-500)Bitmap would convert to a region greater than 64 KB
The BitMapToRegion function can also generate an error if a pixel map is
supplied that is greater than 1 bit per pixel.
pixmapTooDeepErr (-148)Pixel map record is deeper than 1 bit per pixel
You may be able to recover from this problem by imaging your too-deep pixel
map into a 1-bit pixel map and calling BitMapToRegion again.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ QDFlushPortBuffer()

void QDFlushPortBuffer ( CGrafPtr  port,
RgnHandle  region 
)

QDFlushPortBuffer()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ QDGetDirtyRegion()

OSStatus QDGetDirtyRegion ( CGrafPtr  port,
RgnHandle  rgn 
)

QDGetDirtyRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ QDGetPatternOrigin()

void QDGetPatternOrigin ( Point origin)

QDGetPatternOrigin()

Summary: Returns the pattern origin of the current port.

Parameters:

origin: On exit, contains the current port's pattern origin.

Availability:

Non-Carbon CFM: in NQD 8.5 and later
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.1 and later

◆ QDIsPortBufferDirty()

Boolean QDIsPortBufferDirty ( CGrafPtr  port)

QDIsPortBufferDirty()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ QDIsPortBuffered()

Boolean QDIsPortBuffered ( CGrafPtr  port)

Routines available on Mac OS X to flush buffered window ports... These calls do nothing on Mac OS 8/9. QDIsPortBuffered will always return false there. QDIsPortBuffered()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0.2 and later
Mac OS X: in version 10.0 and later

◆ QDRegionToRects()

OSStatus QDRegionToRects ( RgnHandle  rgn,
QDRegionParseDirection  dir,
RegionToRectsUPP  proc,
void *  userData 
)

QDRegionToRects()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ QDRestoreRegionBits()

OSStatus QDRestoreRegionBits ( RgnHandle  region,
QDRegionBitsRef  regionBits 
)

QDRestoreRegionBits()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.1 and later

◆ QDSaveRegionBits()

QDRegionBitsRef QDSaveRegionBits ( RgnHandle  region)

QDSaveRegionBits()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.1 and later

◆ QDSetDirtyRegion()

OSStatus QDSetDirtyRegion ( CGrafPtr  port,
RgnHandle  rgn 
)

QDSetDirtyRegion()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ QDSetPatternOrigin()

void QDSetPatternOrigin ( Point  origin)

QDSetPatternOrigin()

Summary: Sets the pattern origin for the current port.

Discussion: When a QuickDraw drawing operation uses a pattern (either a black&white pattern or a PixPat), the pattern's image is aligned with port origin, modified by the pattern origin of the port. For example, if the background pattern is a 10x10 image, and a rectangle with coordinates (3, 3, 10, 10) is filled with that pattern, then only the bottom right 7x7 portion of the pattern image will be drawn into the rectangle. When drawing a pattern, QuickDraw always starts with the port origin and then adjusts it by the pattern origin to determine the actual origin point of pattern drawing. QDSetPatternOrigin can be used to set the pattern origin relative to the port origin. It is often used in conjuction with SetOrigin to maintain the pattern alignment at (0,0) in a window's content area, regardless of the port origin; for example, after changing the port's origin to (10,10), an application might change the port's pattern origin to (-10, -10) so that patterns are still aligned with the window's content area.

Parameters:

origin: The new pattern origin of the port.

Availability:

Non-Carbon CFM: in NQD 8.5 and later
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.1 and later

◆ QDSwapPort()

Boolean QDSwapPort ( CGrafPtr  inNewPort,
CGrafPtr outOldPort 
)

QDSwapPort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.1 and later

◆ RealColor()

Boolean RealColor ( const RGBColor color)

RealColor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RectInRgn()

Boolean RectInRgn ( const Rect r,
RgnHandle  rgn 
)

Check if a rectangle intersects a region.

RectInRgn returns an indication of whether any pixel enclosed by a specified
rectangle intersects with a specified region.
theRectis the address of an 8-byte Rect structure, defined in local or global
coordinates.
theRgnis a handle to a region. It should be defined in the same coordinate
system as theRect .
Returns
a Boolean value indicating whether the rectangle intersects with the
region. It is one of:
FALSENo intersection
TRUEAt least one pixel is in both areas
Note
Remember that the outlines of theRect and theRgn are infinitely thin, so
just sharing a line or point does not constitute an intersection. This
returns TRUE when a pixel (the dot below and to the right of the point
coordinates) is enclosed by both areas.
An error in the early ROMs occasionally causes this function to incorrectly
return TRUE when the enclosing coordinates overlap (even though they do
not share any pixels). You may need to convert the rectangle to a region
(RectRgn ) and intersect the regions ( SectRgn ) to be real sure of the
answer here. Later versions of the ROMs work correctly.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RectRgn()

void RectRgn ( RgnHandle  rgn,
const Rect r 
)

RectRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ReserveEntry()

void ReserveEntry ( short  index,
Boolean  reserve 
)

Reserve or dereserve color table entry.

ReserveEntry is used by the Color Manager to provide selective protection
or remove reservation from a color table entry.
indexis the identification of the entry to be affected by this procedure.
ReserveFlag specifies whether to reserve the entry or remove its reservation .
It must be one of:
FALSEdereserve any specified entry
TRUEReserve an entry so another client's search procedure won't be
able to match it and it won't be returned to another client by
Color2Index , RGBForeColor , RGBBackColor , etc.
Returns
none
Note
ReserveEntry acts like selective protection by copying the low byte of
gdID into the low byte of colorSpec .value while leaving the high byte alone.
It won't allow changes if the current gdID is different than the one in the
colorSpec .value field of the reserved entry.  Returns a protection error if
a requested match is already reserved. All entries are subject to being
dereserved.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RestoreEntries()

void RestoreEntries ( CTabHandle  srcTable,
CTabHandle  dstTable,
ReqListRec selection 
)

Sets entries into dstTable without rebuilding inverse table.

RestoreEntries saves selected entries so you can put them back later
scrTable is the source of the entries to be saved.
dstTable is the table in which the restorable entries are placed.
 selection is the parameter enumerating the entries for saving and retrieval.
Returns
none
Note
RestoreEntries lets you change the color table without changing its
ctSeed. You can then execute an application and restore the original colors.
What may happen, however, is that the background will be in the wrong
color after restoration since it is not redrawn. Getting around this means
having the application build its own new inverse table and redrawing the
background colors. That, in turn, means that the ctSeed would have to be
explicitly changed.
The dstTable entries are listed in the selection parameter (see
ReqListRec ) and the source and selection are assumed to have the same
number of entries. If a requested entry can't be found, its position on the
list is set to colReqErr and an error is returned.
A NIL for dstTable updates the gDevice's color table (as will a pointer to
the device color table), which updates the hardware to the new colors. The
seed doesn't change and the results are valid but the RGBForeColor may
change. RestoreEntries ignores color table protection and reservation.
Since Palette Manager was designed to give applications their own set of
colors, you'll likely have little need for RestoreEntries .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RGBBackColor()

void RGBBackColor ( const RGBColor color)

RGBBackColor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RGBForeColor()

void RGBForeColor ( const RGBColor color)

RGBForeColor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RgnToHandle()

void RgnToHandle ( RgnHandle  region,
Handle  flattenedRgnDataHdl 
)

RgnToHandle()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.1 and later

◆ SaveEntries()

void SaveEntries ( CTabHandle  srcTable,
CTabHandle  resultTable,
ReqListRec selection 
)

Saves selected entries to a result table.

SaveEntries saves selected entries from a source table to a result table
scrTable is the source of the entries to be saved.
ResultTable is the table in which the saved entries are placed.
 selection is the parameter enumerating the entries to be saved.
Returns
none
Note
If an entry is missing from the source table, its position on the request list
part of the ReqListRec data structure is set to colReqErr , and that position
of the result table has random values returned. When an entry can't be
found, an error is posted to QDError , but every entry that is found yields
valid values in the result table. The source table and the selection
parameter are always assumed to have the same number of entries.
You can have a NIL as the source table parameter but if you do, the active
gDevice's color table is used as the source. SaveEntries ' output is
identical to RestoreEntries ' input.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ScalePt()

void ScalePt ( Point pt,
const Rect srcRect,
const Rect dstRect 
)

Resize coordinate pair to ratio of two rectangles.

ScalePt converts each coordinate of a point to a value calculated as the ratio
of the sizes of two rectangles. You could use this function to scale an object
(such as a pen size or a character rectangle) to match the size of a smaller or
larger window.
thePoint is the address of the point to convert. Upon return, its horizontal
coordinates has been scaled by the ratio of the two rectangles' widths
and the vertical coordinates has been scaled relative to the heights. It
will never be set less than (1,1).
numerRect and . . .
denomRect are addresses of rectangles. Their location is irrelevant; their
widths and heights are used to calculate ratios, which are applied to
the coordinates of thePoint .
Returns
none
Note
Since a point is an undimensional object, you can't really scale it. The
ScalePt function treats thePoint as if it were the bottom-right corner of
a rectangle whose top-left corner is at (0,0). That imaginary rectangle is
scaled to the ratio of numerRect  divided by denomRect . This call is
functionally equivalent to:
numerWide = numerRect.right - numerRect.left;
denomWide = denomRect.right - denomRect.left;
numerHigh = numerRect.bottom - numerRect.top;
denomHigh = denomRect.bottom - denomRect.top;
thePoint.h = (thePoint.h * numerWide) / denomWide;
thePoint.v = (thePoint.v * numerHigh) / denomHigh;
Note: thePoint will never be set smaller than (1,1).
Use MapPt to perform the more common operation of finding the
coordinates of a point inside one rectangle that corresponds to a
similarly-located point within another.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ScreenRes()

An alternative method is to convert shieldRect to global and pass (0, 0) as offsetPt.</ pre> * @par Copyright void ScreenRes ( short *  scrnHRes,
short *  scrnVRes 
)

Obtain screen resolution in pixels-per-inch.

ScreenRes lets you obtain the screen resolution in pixels-per-inch. It can
be useful in scaling objects to make maximum use of the screen real estate.
horizPPI and . . .
vertPPI are the addresses of a 16-bit integers. Upon return, they will
contain the screen resolution, expressed in pixels-per-inch.
Returns
none
Note
This function just copies the values of the low-memory variables ScrHRes
and ScrVRes to your own variables. The addresses of these variables are
defined in Quickdraw.h. Thus, ScreenRes is functionally equivalent to:
horizPPI = ScrHRes;
vertPPI = ScrVRes;
A more-often needed value is the total size of the screen, in pixels. Obtain
that by reading the bounds field from the screenBits BitMap:
horizPixels = screenBits .bounds.right;
vertPixels = screenBits .bounds.bottom;
The global variable, GrayRgn (a RgnHandle ) describes the size and shape of
the desktop. This is especially handy to take advantage of Macs that have
more than one screen.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ScrollRect()

void ScrollRect ( const Rect r,
short  dh,
short  dv,
RgnHandle  updateRgn 
)

ScrollRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SectRect()

Boolean SectRect ( const Rect src1,
const Rect src2,
Rect dstRect 
)

Get the intersection of two rectangles; check for overlap.

Parameters
*rect1addresses of two Rect ...
*rect2... structures to intersect
SectRect checks to see if two rectangles share any points in common and
obtains the coordinates of the intersecting rectangle
rect1and . . .
rect2are addresses of two 8-byte Rect structures. They should use the
same coordinate system.
resultRect is the address of a third Rect structure. Upon return, it will contain
the coordinates of the intersection of rect1 and rect2 . If rect1 and
rect2 share no common points, this returns as the empty rectangle
(0,0)(0,0).
Returns
a Boolean value indicating whether or not rect1 and rect2 share
any common points. It is one of:
FALSENo overlap
TRUESome overlap; resultRect  is non-empty.
Note
The figures below illustrate:

In the figure on the left, the intersection of rectangles A and B is shown in
black, labeled as rectangle C. The call to SectRect will return TRUE, and
resultRect  will contain the coordinates of rectangle C.
The figure on the right illustrates an important concept: a shared border
or a single shared point are not considered as part of the mathematical
intersection of two rectangles. Rectangles D and E are right next to each
other and share a common border.  However, their "overlap" area is a
single mathematical line, enclosing no bits of the bitMap. The call to
SectRect would return FALSE, and resultRect  would be set to
(0,0)(0,0).
It is OK to specify resultRect  as the same rectangle as either of rect1 or
rect2 . For instance, the following line would find the intersection of
rectangles A and B, and store its coordinates into rectangle A, overwriting
the original value.
SectRect ( &rA, &rB, &rA );
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SectRgn()

void SectRgn ( RgnHandle  srcRgnA,
RgnHandle  srcRgnB,
RgnHandle  dstRgn 
)

SectRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SeedCFill()

void SeedCFill ( const BitMap srcBits,
const BitMap dstBits,
const Rect srcRect,
const Rect dstRect,
short  seedH,
short  seedV,
ColorSearchUPP  matchProc,
long  matchData 
)

Calculate a mask for use in CopyMask or CopyBits.

Parameters
matchProcpointer to match seed RGB values
SeedCFill examines a portion of a source bitMap or pixMap and fills a
portion of a destination bitMap or pixMap with 1s where paint can flow. It
finds an enclosed area surrounding a specified point in the source (seed), and
floods that area in the destination with 1s (RGB value equals that of seed).
Use this function as one step in implementing a "paint bucket" tool.
srcMap is the address (srcBits) of a rectangle inside a bitMap or
pixMap data area. SeedCFill examines this rectangle as it
floods portions of the destination bitMap.
destMap is the address (destBits) of a rectangle inside a bitMap or
pixMap data area. SeedCFill fills all or part of this rectangle
with 1s.
srcRect and . . .
destRect are the rectangles within the BitMap or PixMap into which
srcMap and destMap, respectively point; i.e., the function
will add this value to its current address pointer to move "down
one line" in the bitMap.
seedH and...
seedV identify the point to start flooding.
matchProc returns 0s for RGB values to be filled -- returns 1s when the
values should not be filled.
matchData returns the value assigned.
Returns
none
Note
The default setting for SeedCFill allows paint to flow from the seed
position to all positions that touch it and whose RGB value equals that of the
seed. Setting matchProc and matchData to zero calls the default mode.
Use SeedCFill to flood an area of a destination bitMap pixMap with paint
(i.e., 1s) in the exact color of the source. The flooded area will match the
inside and boundary of a section of the source which is enclosed by RGB
pixels.
To flood with some other pattern requires intermediate steps of using
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SeedFill()

void SeedFill ( const void *  srcPtr,
void *  dstPtr,
short  srcRow,
short  dstRow,
short  height,
short  words,
short  seedH,
short  seedV 
)

Calculate a mask for use in CopyMask.

Parameters
srcPtraddress within a BitMap of place to start calculating
destPtraddress within a BitMap of where to store 1s and 0s
SeedFill examines a portion of a source bitmap and fills a portion of a
destination bitMap with 1s. It finds an enclosed area surrounding a specified
point in the source, and floods that area in the destination (as in the lasso tool
of many paint programs) with 1s (black paint).  Use this function as one step
in implementing a "paint bucket" tool.
srcPtris the address of a 16-bit word inside a bitMap data area. SeedFill
will use this as if it were the upper left corner of a rectangle, as
defined by height and wrdsWide .  It will examine this implied
rectangle as it floods portions of the destination bitMap.
destPtris the address of a 16-bit word inside a bitMap data area. SeedFill
will use this as if it were the upper left corner of a rectangle, as
defined by height and wrdsWide . It will fill all or part of this
"rectangle" with 1s.
Note: Both srcPtr and destPtr must point to even (word) addresses.
srcRowBytes and . . .
destRowBytes are the widths of the BitMap into which srcPtr and destPtr,
respectively point; i.e., the function will add this value to its
current address pointer to move "down one line" in the bitMap.
heightis the height, in pixels, of both the source data area and the
destination area.
wrdsWide is the width, in 16-bit words , of both the source and destination
data area.
seedH and...
seedVidentify the point to start flooding. These are offsets, in pixels,
from the boundary of the implied rectangle defined by srcPtr ,
height, and wrdsWide .
Returns
none
Note
Use SeedFill to flood an area of a destination bitMap with black paint
(i.e., 1s). The flooded area will match the inside and boundary of a section
of the source that is enclosed by black pixels. Note that destPtr and srcPtr
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetCCursor()

void SetCCursor ( CCrsrHandle  cCrsr)

SetCCursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetClientID()

void SetClientID ( short  id)

Identify this client to search and complement procedures.

SetClientID sets the gdID field in the device record so that its search and
complement procedures will recognize this particular client program.
idis the client program being given identification
Returns
none
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetCPixel()

void SetCPixel ( short  h,
short  v,
const RGBColor cPix 
)

SetCPixel()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetCursorComponent()

OSErr SetCursorComponent ( ComponentInstance  ci)

SetCursorComponent()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetDeviceAttribute()

void SetDeviceAttribute ( GDHandle  gdh,
short  attribute,
Boolean  value 
)

SetDeviceAttribute Set the device's display characteristics.

Use SetDeviceAttribute to set a device's display characteristics. This
routine is rarely called by applications.
gdhis the handle that communicates with the gDevice record.
attribute is one of seven graphics device characteristics that can be on or off.
valueis a Boolean value that indicates whether the specified attribute is
set (TRUE) or not (FALSE) as follows:
gdDevType: TRUE = Color; FALSE = Monochrome
ramInit: TRUE = Device initialized from RAM
mainScreen: TRUE = Device is startup screen
allInit:TRUE = Device initialized from 'scrn' resource (see below)
screenDevice: TRUE = Device is a display monitor
noDriver: TRUE = No driver for device
screenActive: TRUE = Active device
Returns
none
For more information, see The 'scrn' Resource .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetEmptyRgn()

void SetEmptyRgn ( RgnHandle  rgn)

SetEmptyRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetEntries()

void SetEntries ( short  start,
short  count,
CSpecArray  aTable 
)

Set a group of color table entries for the current gDevice.

SetEntries sets the enumerated color table entries for the current gDevice.
startis the given position where the specified number of entries begin.
count yields the total number of color table entries in the group being set.
aTableis a cSpecArray, not a color table
Returns
none
Note
SetEntries sets many color table entries to the current gDevice. Its
aTable parameter points to a cSpecArray (rather than a color table) in
which the colorSpec .value field of the entries has to fall within the logical
range for the gDevice's assigned pixel depth. For example, if the gDevice
lists a 4-bit pixel size, the colorSpec .value fields must be in the 1 to 15
range and, if the device has 8-bit pixels, the colorSpec .value fields range
from 0 to 255. All values are zero-based so setting three entries means
that you pass a 2 in the count parameter.
Since SetEntries lists its positional information in terms of logical space
instead of memory locations as used by the gDevice, specifying a color table
change won't necessarily get you a change in the hardware's color
table--but it will be correctly reflected in the colors on the screen.
There are actually two SetEntries modes-- index mode and sequence
mode.
For the latter, the distinguishing characteristic is a specified start
position and a length. Index mode SetEntries , on the other hand, leave the
specifying of where the data will be installed up to the cSpecArray (which
handles such chores on an individual basis for each entry).
While sequence mode loads new colors in the same order they appear in the
aTable, with clientID fields for changed entries copied from the gDevice's
gdID field, index mode installs each entry based on a position specified by
its colorSpec .value field in the cSpecArray . Then, in the gDevice's color
table, all changed entries' colorSpec .value fields get the gdID value. You
initiate the index mode by passing -1 for the start position, with a valid
count and pointer to the cSpecArray .
Changing a color table entry invalidates all cached fonts as well as the seed
number, meaning that the inverse table will be rebuilt by the next drawing
operation. If any requested entry is protected or out of range, you get a
protection error and nothing else. If a requested entry is reserved, the
gDevice's gdID has to match the low byte of the intended colorSpec .value
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetGDevice()

void SetGDevice ( GDHandle  gd)

Set the current device to the specified device.

SetGDevice sets the specified graphics device record as the current device.
Your application won't generally need to use this procedure except to draw
offscreen graphics devices.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetPenState()

void SetPenState ( const PenState pnState)

Set the pen location, size, pattern and mode.

SetPenState sets the location, size, pattern and transfer mode of the pen of
the current GrafPort . It is typically used to restore the pen characteristics
after they were saved via a prior call to GetPenState .
Returns
none
Note
You can reset the pen characteristics to their initial state via
PenNormal .
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetPortCustomXFerProc()

OSErr SetPortCustomXFerProc ( CGrafPtr  port,
CustomXFerProcPtr  proc,
UInt32  flags,
UInt32  refCon 
)

SetPortCustomXFerProc()

Availability:

Non-Carbon CFM: in InterfaceLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetPortPix()

void SetPortPix ( PixMapHandle  pm)

Replaces a portPixMap of the active CGrafPort with a handle.

SetPortPix replaces the portPixMap field of the active CGrafPort with a
new value, effectively changing the entire contents of the port.
Returns
none
Note
This is the Color Quickdraw equivalent of the SetPortBits procedure that
QuickDraw uses on GrafPorts.  SetPortPix cannot be used at all on
old-style GrafPort s. Conversely, a SetPortBits call used in conjunction
with a cGrafPort , will likewise yield nothing.
Like its predecessor, SetPortPix is useful for performing off-screen
drawing. For instance, you can use a series of Color Quickdraw calls to
create an image in an off-screen memory buffer, then use CopyBits to
copy the bit-mapped image into the normal screen.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetPt()

void SetPt ( Point pt,
short  h,
short  v 
)

Pack horizontal and vertical coordinates into Point.

SetPt stores two coordinate values into a Point structure.
thePoint is the address of a 4-byte Point structure. Upon return, it will
contain the coordinates specified by horiz and vert .
horizand . . .
vertare coordinate values, ranging from -32767 to 32767. Negative
values are upward and toward the left; positive values are downward
and toward the right.
Returns
none
Note
SetPt is functionally equivalent to the faster:
thePoint-> h = horiz;
thePoint-> v = vert;
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetStdCProcs()

void SetStdCProcs ( CQDProcs procs)

Set graphProcs field to point to custom routines.

SetStdCProcs stores the addresses of the standard Quickdraw procedures
into a structure intended to be used in a CGrafPort .
 cProcsis the address a CQDProcs structure. Upon return, all fields of
the structure have been set to contain the addresses of the standard
low-level routines used by Color Quickdraw.
Returns
none
Note
This is used by applications that wish to intercept selected low-level
routines (e.g., the picture-comment handler) while continuing to use the
other standard routines.
SetStdCProcs has to be used in place of the older SetStdProcs
whenever your application is drawing in a cGrafPort .
Most applications won't need to replace code. If you do wish to install a
custom Color Quickdraw function handler (sometimes called a "bottleneck"
routine), follow these steps:
•Create a function which accepts the same parameters in the same order as
one of Color Quickdraw's StdXxx functions.
•Open a CGrafPort (OpenCPort or NewCWindow ).
•Create a standard CQDProcs structure by allocating it and then using
SetStdCProcs to initialize it.
•Store the address of your custom procedure into the appropriate field of
the CQDProcs structure.
•Store the address of your CQDProcs structure into the cGrafProcs field of
the desired CGrafPort .
Now, when your application invokes a Color Quickdraw function that passes
through the intercepted bottleneck, your custom handler will get control.
You need not replace all the functionality of a bottleneck -- you may choose
to simply pre-process the parameters passed to you and then invoke the
original handler.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ shieldcursor()

void shieldcursor ( const Rect shieldRect,
Point offsetPt 
)

shieldcursor()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ StdArc()

void StdArc ( GrafVerb  verb,
const Rect r,
short  startAngle,
short  arcAngle 
)

StdArc()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdBits()

void StdBits ( const BitMap srcBits,
const Rect srcRect,
const Rect dstRect,
short  mode,
RgnHandle  maskRgn 
)

StdBits()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdComment()

void StdComment ( short  kind,
short  dataSize,
Handle  dataHandle 
)

StdComment()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdGetPic()

void StdGetPic ( void *  dataPtr,
short  byteCount 
)

The default Quickdraw picture-retrieving routine.

Parameters
destPtrwhere to store the picture definition data
  
Note
 
Use StdGetPic only if your applicatin intercepts the Quickdraw
bottleneck routines (see SetStdProcs ).
This is a bottleneck routine that is frequently intercepted by application
programs. By creating a custom version of StdGetPic and StdPutPic that
is able to access a disk file, you can store and retrieve pictures larger than
the maximum limits set by Quickdraw.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
     
Carbon Lib: in CarbonLib 1.0 and later
     
Mac OS X: in version 10.0 and later

◆ stdline()

void stdline ( const Point newPt)

stdline()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ StdLine()

void StdLine ( Point  newPt)

StdLine()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdOpcode()

void StdOpcode ( const Rect fromRect,
const Rect toRect,
UInt16  opcode,
SInt16  version 
)

StdOpcode()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdOval()

void StdOval ( GrafVerb  verb,
const Rect r 
)

StdOval()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdPoly()

void StdPoly ( GrafVerb  verb,
PolyHandle  poly 
)

StdPoly()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdPutPic()

void StdPutPic ( const void *  dataPtr,
short  byteCount 
)

StdPutPic()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdRect()

void StdRect ( GrafVerb  verb,
const Rect r 
)

StdRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdRgn()

void StdRgn ( GrafVerb  verb,
RgnHandle  rgn 
)

StdRgn()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StdRRect()

void StdRRect ( GrafVerb  verb,
const Rect r,
short  ovalWidth,
short  ovalHeight 
)

StdRRect()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ stuffhex()

void stuffhex ( void *  thingPtr,
const char *  s 
)

stuffhex()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ StuffHex()

void StuffHex ( void *  thingPtr,
ConstStr255Param  s 
)

Convert a string of hex digits to binary data.

Parameters
destPtrgeneric pointer; address of any data type
StuffHex reads a pascal-style string of hexadecimal digits, converts them to
binary data and stores the result into any data type.
destPtris the address of any type of data object; typically the address of a
Pattern or Cursor, even a BitMap. Upon return, the memory
pointed to by destPtr will be overwritten with binary data.
hexString is the address of a Pascal-style string (a length-prefixed array of
characters). Following the length byte, all characters must be in the
range '0' to '9' and 'A' to 'F'.
Returns
none
Note
This call performs no range checking , so make sure that the buffer at
destPtr is large enough to receive all the binary data defined in hexString .
The destination buffer may need to be as large as 127 bytes.
This function can be useful during program development, but it is rarely
needed in a finished program - your compiler is capable of converting hex
digits into binary data. For instance, the sequence:
StuffHex ( &myPat, "\p0103070F1F3F7FFF" )
can be eliminated by defining the pattern at compile time; e.g.,
Pattern myPat = { 0x1, 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF };
Furthermore, most objects that you might wish to pack with binary data
should probably be predefined and available as a program resource.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ subpt()

void subpt ( const Point src,
Point dst 
)

subpt()

Availability:

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SubPt()

void SubPt ( Point  src,
Point dst 
)

Subtract coordinates of one point from another.

SubPt subtracts the coordinates of one Point from another, storing the result
into the second.
srcPtis a 4-byte Point structure. Its low word is the horizontal
coordinate and its high word is the vertical coordinate.
destPtis the address of a 4-byte Point structure. Upon return, it will
contain the differences: (destPt.h-srcPt.h) and (destPt.v-destPt.v).
Returns
none
Note
The SubPt operation separates the horizontal coordinate from the vertical
coordinates before calculating the difference. It is functionally equivalent
to:
destPt.h -= srcPt. h;
destPt.v -= srcPt. v;
Perhaps more useful is DeltaPoint , which returns the difference as the
return value of the function.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SyncCGContextOriginWithPort()

OSStatus SyncCGContextOriginWithPort ( CGContextRef  inContext,
CGrafPtr  port 
)

SyncCGContextOriginWithPort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
Mac OS X: in version 10.0 and later

◆ TestDeviceAttribute()

Boolean TestDeviceAttribute ( GDHandle  gdh,
short  attribute 
)

TestDeviceAttribute Check whether or not an attribute is set.

TestDeviceAttribute returns an indication as to what kind of gDevice you
have and whether or not it is set.
curDevice is the handle that leads to the device being tested in the gDevice
record.
attribute is one of seven graphics device characteristics that can be on or off.
Returns
 a Boolean value indicating the status of a particular
attribute It is one of:
FALSE Not set
TRUE Attribute set
Note
Scanning through a device list, TestDeviceAttribute tells you if your
device is a display and if it's active. It does not necessarily tell if the
monitor is turned on, or if there is a monitor attached to the card.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UnlockPortBits()

OSErr UnlockPortBits ( GrafPtr  port)

UnlockPortBits()

Availability:

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UnpackBits()

void UnpackBits ( Ptr *  srcPtr,
Ptr *  dstPtr,
short  dstBytes 
)

Uncompress data stored via PackBits.

restoring it via UnpackBits .
Since the destLen value must be known in advance, any generalized
packed-data save/restore procedure would need to have this value
accompany the compressed data.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UpdatePort()

OSErr UpdatePort ( GrafPtr  port)

UpdatePort()

Availability:

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

Variable Documentation

◆ Copyright

</ pre> * par Copyright

Check if a specified pixel is enclosed by a region.

Perform RLL byte compression on arbitrary data.

PtInRgn returns an indication of whether or not a point (actually, the pixel
below and to the right of a mathematical coordinate) is enclosed by the outline
of a region.
thePtis a Point, expressed in local or global coordinates.
theRgnis the handle of a region, in the same coordinate system as thePt.
Returns
a Boolean value indicating whether the point is inside of the region.
It is one of:
FALSENot in the region
TRUEIn the region
Note
This is useful in determining if a mouse-down event has occurred while
the cursor was positioned in the area of a region. Note that since the
EventRecord .where field is expressed in global coordinates, so you may
need to convert as follows:
GetNextEvent ( everyEvent , &theEvent );:
GlobalToLocal ( &theEvent.where );
if (PtInRgn ( theEvent.where, theRgn ) {
... /* yes, it was in that region 

From ToolUtils.i


PackBits compresses up to 32,768 bytes of data by replacing sequences of 3
or more identical bytes with a 2-byte code. It is most often used to compress
image data, as found in a BitMap or a PixMap. The worst case compression can
be calculated using the formula: (srcLen + (srcLen + 126) / 127).
srcPtris the address of a pointer to some data to be compressed. Upon
return, the pointer has been adjusted to just beyond the data that has
been compressed; i.e., ready for the next call.
destPtris the address of a pointer to a buffer to hold the compressed data.
Upon return, it has been adjusted to just beyond the end of the
compressed data.
srcLenis the size, in bytes, of the data to be compressed.
Returns
 
none
Note
 
Since image data is often full of "white-space", this is ideal for packing
data for long-term RAM storage and before writing it to disk or storing it in
a resource. It is not quite so useful for compressing text or other data. Note
the misnomer: PackBits does not pack bits; it packs sequences of bytes.
PackBits was formerly limited to compressing data in 127 bytes blocks.
To compress more than 127 bytes, a programmer would have to break the
data up and make multiple calls to PackBits . Starting with System
Software version 6.0.2, this restriction has been lifted. If you want your
program to run on Systems prior to version 6.0.2, you must obey the
127-byte limit.
Typical usage is to pack each line of a BitMap or PixMap separately, as in
the example below. The example procedure, PackScreen, typically
compresses a black and white screen image from 32K down to about 4K or
5K.
Example
#include < ToolUtils.h >
PtrsavePtr;
longmapSize, PackScreen( Ptr);
mapSize = (long) screenBits .bounds.bottom * screenBits .rowBytes;
savePtr = NewPtr ( mapSize + 1 ); /* allocate storage buffer 

◆ ctlCode

ctlCode = FindControl(myEvent.where, myWindow, &myCtl)

Obtain local coordinates of global point.

GlobalToLocal converts a point from global (screen) coordinates to values
expressed in coordinates of the current GrafPort . It is used to obtain the local
address of a mouse-down event and as a step in converting between coordinates
of two different grafPorts.
thePoint is the address of a 4-byte Point structure, expressed in global
(screen) coordinates. Upon return, it will contain the coordinates of
that same position, expressed in the coordinate system of the current
GrafPort .
Returns
none
Note
The specified Point is converted, in place. Upon return, it is the same
physical location, expressed in global coordinates.
For instance, mouse-down events are reported in global coordinates, but
TextEdit and the Control Manager functions expect local (window-relative)
coordinates. Thus, a typical sequence may include:
EventRecord myEvent;
ControlHandle myCtl;
short ctlCode;
GetNextEvent ( everyEvent , &myEvent );
if ( myEvent.what ) == mouseDown {
GlobalToLocal ( &myEvent. where );/* get local equivalent 

◆ dv

short dv = startPt.v - endPt.v

Calculate slope given an angle.

theSlope = SlopeFromAngle ( 17 ); /* get slope of 17 ° angle 

◆ efficient

they are equal or the more efficient

Check if two points are identical.

EqualPt compares the coordinates of two points and returns an indication
whether they are identical. This function is used if you have no need
whatsoever of execution speed.
point1and . . .
point2are 4-byte Point structures.
Returns
a Boolean indicating whether the points are identical. It is one of:
FALSENot the same
TRUEExactly the same
Note
EqualPt can be used to make your code more readable. The sequence:
if (EqualPt ( point1, point2 ) {
... they are equal ...
}
is functionally equivalent to:
if ( (pt1.h == pt2.h) && (pt1.v==pt2.v) ) { /* compare shorts twice

◆ theRand

theRand = Random()

Obtain pseudo-random signed integer.

Random generates and returns a different pseudo-random number each time
it is called. The return value ranges from -32767 to 32767.
Returns
a signed integer; the next in a sequence of pseudo-random values,
uniformly distributed over the range -32767 to 32767.
Note
To obtain a number within a selected range multiply the return value by
the range, divide by 65536, and add the desired minimum value. See the
Example, below.
The numbers are generated in a sequence based upon the starting, or "seed"
value, which is stored in the global 32-bit variable randSeed .
The seed is initialized to 1 by InitGraf . If you start a sequence by storing
a value in randSeed , you can restart the same sequence by setting randSeed
to the same value. A more typical operation is to start the sequence with
some relatively unguessable value, such as the system time:
GetDateTime ( &randSeed ); /* store 32-bit value in seed 

◆ theSlope

theSlope = FixRatio(INT2FIX(dh), INT2FIX(dv))

Calculate angle given slope.

vertical change between any two points on the line) AngleFromSlope
calculates the angle of that line. The calculation is approximate to the nearest
degree.
theSlope a 4-byte Fixed value; the dh/dv ratio of points on a line.
Returns
a signed short integer representing the angle most closely matching
the specified slope ratio. Positive values are clockwise from vertical
and negative values are counterclockwise.
Note
The returned angle is expressed in circular degrees, going clockwise with
12 o'clock at 0 °, 3 o'clock at 90 °, etc.  Negative values are
counterclockwise from straight up; e.g., 9 o'clock is -90 °.
The following example calculates the slope of a line represented by two
endpoints and uses AngleFromSlope to derive the angle of the line.
Example
#include < ToolUtils.h >
#define INT2FIX(i) ((long) i << 16 )/* short to Fixed conversion macro 

◆ tmpPt

LocalToGlobal& tmpPt

Obtain global (screen) value of local point.

LocalToGlobal converts the coordinates of a local point (relative to the
current GrafPort origin) to global (screen) coordinates. It can then be
compared to other global points or converted to the local coordinates of a
different GrafPort .
thePoint is the address of a 4-byte Point structure, expressed in coordinates
of the current GrafPort . Upon return, it will contain the coordinates
of that same position, expressed to the global, screen coordinates.
Returns
none
Note
The result of the conversion is based relative to coordinate (0,0) of the
device's BitMap; typically the screen.
To convert the coordinates of a rectangle from local to global, you can apply
this call to both corners; e.g.:
RecttheRect;
LocalToGlobal ( & topleft(theRect);
LocalToGlobal ( &.botRight(theRect) );
Rectangles and other graphic elements (regions and polygons) can be
converted to the global coordinate system via a 3-step sequence:
1Use LocalToGlobal to obtain the global coordinates of one corner of a
local item.
2Use SubPt or DeltaPoint to determine the difference between the local
and global coordinate systems.
3Use OffsetXxx to reposition the item.
For instance, the following sequence converts a local Polygon to global
coordinates:
Point tmpPt,localPt;
PolyHandle thePoly;
tmpPt=localPt=topLeft( (thePoly)-> polyBBox );/ get corner 

◆ w1

w1 = r1.right - r1.left

Map point relative to two rectangles.

MapPt maps a point within one rectangle to a similarly-located position in a
different rectangle. Use this to scale individual points of an object being moved
to a larger or smaller rectangle.
thePoint is the address of a 4-byte Point structure. On entry, it is the
coordinates of a point, relative to srcRect that you wish to convert;
upon return, it contains the coordinates of a point relative to the size
and position of destRect .
srcRect and . . .
destRect are the addresses of two 8-byte Rect structures.  For typical
operations, thePoint is an element of an object enclosed by srcRect .
It gets mapped to a similar position within destRect .
Returns
none
Note
This function is typically used to convert individual points of an object
(e.g., a "freehand" drawing) within one rectangle to similar positions
within a larger or smaller rectangle. Other tools exist to scale rectangles
(MapRect ), regions ( MapRgn ), and polygons ( MapPoly ).
For instance, a corner of srcRect will map exactly to the corresponding
corner of destRect ; similarly, the center of srcRect maps to the center of
destRect . Other points will be positioned at distances from the edges
relative to the ratio of the sizes of the rectangles.
srcRect destRect
It is OK if the two rectangles overlap, and thePoint need not be enclosed by
srcRect (in that case, its remapped position will be outside of destRect ).
This call is functionally equivalent to the long-winded:
h1=r1.bottom-r1.top; h2=r2.bottom - r2.top; /* calc heights