Drawing Outside Windows
Sometimes you need to draw outside of an appliation's windows. For example,
you might want to draw a "zoom" special effect centered on an object to show
that you're opening that object, like in the Finder.
Note: If you want to drag an object from one window to an other, try using
If you follow these rules, your application can draw outside of its windows. Be
aware that Apple may change how to do this in a future release.
• Draw modally. Make sure nothing can interrupt you while there is
something drawn outside of your windows. If you're dragging an object,
drag only while the mouse button is down. (Check the state of the mouse
while you're drawing.
• Don't leave any drawing outside a window. The system won't know you left
something there, and the Finder will draw over it.
Set the visRgn of the port to a copy of GrayRgn. Set the portRect of the port to the rgnBBox of GrayRgn.
• Draw with srcXor mode. This mode lets you erase an object by drawing it
a second time in srcXor mode. Remember, you must not leave any drawing
outside your windows.