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 theGetPattern
function.
FUNCTION GetPattern (patID: Integer): PatHandle;
patID
- The resource ID for a resource of type
'PAT '
.DESCRIPTION
TheGetPattern
function returns a handle to the pattern having the resource ID that you specify in the patID parameter. TheGetPattern
function 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, theGetPattern
function returnsNIL
.The data structure of type
PatHandle
is 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
TheGetPattern
function 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; thePattern
record 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 theGetResource
function. See Inside Macintosh: Memory for information about theDisposeHandle
procedure.