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 theBackPat
procedure.
PROCEDURE BackPat (pat: Pattern);
pat
- A bit pattern, as defined by a
Pattern
record.DESCRIPTION
TheBackPat
procedure sets the bit pattern defined in thePattern
record, which you specify in thepat
parameter, to be the background pattern. (The standard bit patternswhite
,black
,gray
,ltGray
, anddkGray
are predefined; the initial background pattern for the graphics port iswhite
.) This pattern is stored in thebkPat
field of aGrafPort
record.The
BackPat
procedure also sets a bit pattern for the background color in a color graphics port. TheBackPat
procedure creates a handle, of typePixPatHandle
, for the bit pattern and stores this handle in thebkPixPat
field of theCGrafPort
record. As in basic graphics ports, Color QuickDraw draws patterns in color graphics ports at the time of drawing, not at the time you usePenPat
to set the pattern.SPECIAL CONSIDERATIONS
TheBackPat
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
ThePattern
record 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
CGrafPort
record is described in the chapter "Color QuickDraw." To use a multicolored background pattern in a color graphics port, use theBackPixPat
procedure, which is described in the chapter "Color QuickDraw."