Important: The information in this document is obsolete and should not be used for new development.
GetIndPattern
To get a pattern stored in a pattern list ('PAT#'
) resource, you can use theGetIndPattern
procedure.
PROCEDURE GetIndPattern (VAR thePattern:\xDDPattern; patListID: Integer; index: Integer);
thePattern
APattern
record.patListID
- The resource ID for a resource of type
'PAT#'
.index
- The index number for the desired pattern within the pattern list (
'PAT#'
) resource.DESCRIPTION
In the parameterthePattern
, theGetIndPattern
procedure returns aPattern
record for a pattern stored in a pattern list ('PAT#'
) resource. Specify the resource ID for a pattern list ('PAT#'
) resource in thepatListID
parameter. In theindex
parameter, specify the index number to a particular pattern stored in that resource. The index number can range from 1 to the number of patterns in the pattern list resource. TheGetIndPattern
procedure calls the following Resource Manager function with these parameters:
GetResource('PAT ', patListID);There is a pattern list resource in the System file that contains the standard Macintosh patterns used by MacPaint. Figure 3-28 shows these standard patterns. The resource ID, and the constant you can use to represent it, are
CONST sysPatListID = 0;Figure 3-28 Standard patternsSPECIAL CONSIDERATIONS
TheGetIndPattern
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
The pattern list resource is described on page 3-137; 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.