Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Data Structures /


Pattern

Your application typically does not create Pattern records, which are data structures of type Pattern. Although you can create Pattern records in your program code, it is usually easier to create bit patterns using the pattern or pattern list resource, described beginning on page 3-136.

A bit pattern is a 64-bit image, organized as an 8-by-8 bit square, that defines a repeating design or tone. When a pattern is drawn, it's aligned so that adjacent areas of the same pattern in the same graphics port form a continuous, coordinated pattern. QuickDraw provides predefined patterns in global variables named white, black, gray, ltGray, and dkGray. A Pattern record is defined as follows:

TYPE  PatPtr      = ^Pattern;
      PatHandle   = ^PatPtr;
      Pattern     = PACKED ARRAY[0..7] OF 0..255;
The row width of a pattern is 1 byte.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996