Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines / Determining Whether QuickDraw Has Finished Drawing


Although you will probably never need to determine whether QuickDraw has completed drawing, you can do so by using the QDDone function.

FUNCTION QDDone (port: GrafPtr): Boolean;
The GrafPort record for a graphics port in which your application has begun drawing; if you pass NIL, QDDone tests all open graphics ports.
The QDDone function returns TRUE if all drawing operations have finished in the graphics port specified in the port parameter, FALSE if any remain to be executed. If you pass NIL in the port parameter, then QDDone returns TRUE only if drawing operations have completed in all ports.

The QDDone function may be useful if a graphics accelerator is present and operating asynchronously. You could use it to ensure that all drawing is done before issuing new drawing commands, and to avoid the possibility that the new drawing operations might be overlaid by previously issued but unexecuted operations.

The QDDone function has little or no usefulness.

If a graphics port draws a clock or some other continuously operating drawing process, QDDone may never return TRUE.

To determine whether all drawing in a color graphics port has completed, you must coerce its CGrafPort record to a GrafPort record, which you pass in the port parameter.

The trap macro and routine selector for the QDDone function are
Trap macroSelector

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996