GetPenState
GetPenState Obtain current location, size, and mode of pen
#include <Quickdraw.h> Quickdraw
void GetPenState(thePnState );
PenState *thePnState ; address of an 18-byte PenState structure
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
Returns: none

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
with ShowPen...HidePen to fully implement invisible nesting.
Example
#include <Quickdraw.h>
DrawSomething()
{
PenState savePenState;
GetPenState( &savePenState ); /* save current state */
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 */
}