Important: The information in this document is obsolete and should not be used for new development.
GetPattern
To get a pattern ('PAT ') resource stored in a resource file, you can use theGetPatternfunction.
FUNCTION GetPattern (patID: Integer): PatHandle;
patID- The resource ID for a resource of type
'PAT '.DESCRIPTION
TheGetPatternfunction returns a handle to the pattern having the resource ID that you specify in the patID parameter. TheGetPatternfunction calls the following Resource Manager function with these parameters:
GetResource('PAT ', patID);If a pattern resource with the ID that you request does not exist, theGetPatternfunction returnsNIL.The data structure of type
PatHandleis defined as follows:
TYPE PatPrt = ^Pattern; PatHandle = ^PatPtr; Pattern = PACKED ARRAY[0..7] OF 0..255;When you are finished using the pattern, dispose of its handle with the Memory Manager functionDisposeHandle.SPECIAL CONSIDERATIONS
TheGetPatternfunction may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.SEE ALSO
The pattern resource is described on page 3-136; thePatternrecord is described on page 3-36. See the chapter "Resource Manager" in Inside Macintosh: More Macintosh Toolbox for more information about resources, the Resource Manager, and theGetResourcefunction. See Inside Macintosh: Memory for information about theDisposeHandleprocedure.