Specifications

Apple II Technical Notes
Apple IIGS
2 of 2 #72: QuickDraw II Quirks
You May Need SetBufDims!
The call description for SetBufDims on page 16-215 of Volume 2 of theToolbox Reference is
misleading. The note in the description states, “You only need to make this call if your application
is going to use, or allow the user to choose, fonts that have unusually large values of chExtra and
spExtra.” This is not true; you need to call SetBufDims to adjust the clipping buffers for
your application if you plan to use a clipRgn that has a greater width than the width you passed at
QDStartUp.
SetBufDims sets the clipping buffer width as well as that of the text buffer, so if you plan to use
a clipping region larger than the startup port width you must use SetBufDims.
Be aware that this call may be necessary even if your application does not ever set a clipping region
or rectangle. Some toolbox calls assume that the clipping buffer size is correct based on the
parameters passed to that routine. For example, if the locInfo you pass to CopyPixels has a
width parameter that is wider than the width you passed at QDStartUp, CopyPixels may fail.
A safe rule of thumb is to make sure (possibly by setting) that the width parameter in the buffer
dimensions is the same or greater than the widest width in the locInfo structures passed to
routines that use them.
Further Reference
Apple IIGS Toolbox Reference, Volumes 1 and 3