GetPenState
GetPenState Obtain current location, size, and mode of pen 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
Notes: 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
Example
#include <Quickdraw.h>
DrawSomething()
{
ShowPen(); [TOKEN:12074] we want pen to be visible */ /* ...draw some figure here which may change the state... */
SetPenState( &savePenState ); /* restore the pen's visible state */ }