Important: The information in this document is obsolete and should not be used for new development.
BackPat
To change the bit pattern used as the background pattern by the current graphics port, use theBackPatprocedure.
PROCEDURE BackPat (pat: Pattern);
pat- A bit pattern, as defined by a
Patternrecord.DESCRIPTION
TheBackPatprocedure sets the bit pattern defined in thePatternrecord, which you specify in thepatparameter, to be the background pattern. (The standard bit patternswhite,black,gray,ltGray, anddkGrayare predefined; the initial background pattern for the graphics port iswhite.) This pattern is stored in thebkPatfield of aGrafPortrecord.The
BackPatprocedure also sets a bit pattern for the background color in a color graphics port. TheBackPatprocedure creates a handle, of typePixPatHandle, for the bit pattern and stores this handle in thebkPixPatfield of theCGrafPortrecord. As in basic graphics ports, Color QuickDraw draws patterns in color graphics ports at the time of drawing, not at the time you usePenPatto set the pattern.SPECIAL CONSIDERATIONS
TheBackPatprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
ThePatternrecord is described on page 3-36. To define your own patterns, you typically create pattern or pattern list resources, which are described beginning on page 3-136.The
CGrafPortrecord is described in the chapter "Color QuickDraw." To use a multicolored background pattern in a color graphics port, use theBackPixPatprocedure, which is described in the chapter "Color QuickDraw."