Important: The information in this document is obsolete and should not be used for new development.
PenPat
To set the bit pattern to be used by the graphics pen in the current graphics port, use thePenPat
procedure.
PROCEDURE PenPat (pat: Pattern);
pat
- A bit pattern, as defined by a
Pattern
record.DESCRIPTION
ThePenPat
procedure sets the graphics pen to use the bit pattern defined in thePattern
record that you specify in thepat
parameter. (The standard patternswhite
,black
,gray
,ltGray
, anddkGray
are predefined; the initial bit pattern for the pen isblack
.) This pattern is stored in thepnPat
field of aGrafPort
record. The QuickDraw painting procedures (such asPaintRect
) also use the pen's pattern when drawing a shape.The
PenPat
procedure also sets a bit pattern for the graphics pen in a color graphics port. ThePenPat
procedure creates a handle, of typePixPatHandle
, for the bit pattern and stores this handle in thepnPixPat
field of theCGrafPort
record. This pattern always uses the graphics port's current foreground and background colors.SPECIAL CONSIDERATIONS
ThePenPat
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 set the graphics pen to use a multicolored pixel pattern in a color graphics port, use thePenPixPat
procedure, which is described in the chapter "Color QuickDraw."Listing 3-3 on page 3-18 illustrates how to use the
PenPat
procedure.