![]() |
QDError |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Obtains a result code from the last applicable QuickDraw function that you called.
SInt16 QDError ();
The error result. On a system with only basic QuickDraw, QDError always returns noErr.
The QDError function is helpful in determining whether insufficient memory caused a drawing operation - particularly those involving regions, polygons, pictures, and images copied with CopyBits - to fail.
Basic QuickDraw uses stack space for work buffers. For complex operations such as depth conversion, dithering, and image resizing, stack space may not be sufficient. QuickDraw attempts to get temporary memory from other parts of the system. If that is still not enough, QDError returns the nsStackErr error. If your application receives this result, reduce the memory required by the operation.
When you structure drawing operations in an open region, the resulting region description may overflow the 64 KB limit. In this case, QDError returns regionTooBigError. Since the resulting region is potentially corrupt, the CloseRgn function returns an empty region if it detects QDError has returned regionTooBigError. A similar error, rgnTooBigErr, occurs when using the BitMapToRegion function to convert a bitmap to a region.
The BitMapToRegion function also generates the pixmapTooDeepErr error if a PixMap structure is supplied that is greater than 1 bit per pixel. You may be able to recover from this problem by coercing your PixMap structure into a 1-bit PixMap structure and calling the BitMapToRegion function again.
The QDError function does not report errors returned by basic QuickDraw.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)