Important: The information in this document is obsolete and should not be used for new development.
BackPixPatTo assign a pixel pattern as the background pattern, you can use the
BackPixPatprocedure; this allows the
ScrollRectprocedure and the shape-erasing procedures (for example,
EraseRect) to fill the background with a colored, patterned "ink."
PROCEDURE BackPixPat (ppat: PixPatHandle);
- A handle to the pixel pattern to use as the background pattern.
BackPixPatprocedure sets the background pattern for the current graphics device to a pixel pattern. The
BackPixPatprocedure is similar to the basic QuickDraw procedure
BackPat, except that you pass
BackPixPata handle to a multicolored pixel pattern instead of a bit pattern.
BackPixPatprocedure stores the handle to the pixel pattern in the
bkPixPatfield of the
CGrafPortrecord. Because the handle to the pixel pattern is stored in the
CGrafPortrecord, you should not dispose of this handle. QuickDraw removes all references to your pattern from an existing graphics port when you dispose of it.
If you use
BackPixPatto set a background pixel pattern in a basic graphics port, the data in the
pat1Datafield of the
PixPatrecord is placed into the
bkPatfield of the
BackPixPatprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.
PixPatrecord is described on page 4-49. To define your own pixel pattern, you can create a pixel pattern resource, which is described on page 4-94, or you can use the
NewPixPatfunction, which is described on page 4-79.
GrafPortrecord is described in the chapter "Basic QuickDraw." To set the background pattern to a bit pattern, you can also use the
BackPatprocedure, which is described in the chapter "QuickDraw Drawing" in this book. The
BackPatprocedure creates a handle, of type
PixPatHandle, for the bit pattern and stores this handle in the
bkPixPatfield of the
CGrafPortrecord. As in basic graphics ports, Color QuickDraw draws patterns in color graphics ports at the time of drawing, not at the time you use
BackPatto set the pattern.