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
Routines / Drawing Polygons


FillPoly

To fill a polygon with any available bit pattern, use the FillPoly procedure.

PROCEDURE FillPoly (poly:\xDDPolyHandle; pat:\xDDPattern);
poly
A handle to the polygon to fill.
pat
The bit pattern to use for the fill. Figure 3-3 on page 3-6 illustrates the default fill patterns and the constants you can use to represent them.
DESCRIPTION
Using the patCopy pattern mode, the FillPoly procedure draws the interior of the polygon whose handle you pass in the poly parameter with the pattern defined in the Pattern record that you specify in the pat parameter.

This procedure leaves the location of the graphics pen unchanged.

SPECIAL CONSIDERATIONS
The FillPoly procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

SEE ALSO
Listing 3-10 on page 3-26 illustrates how to use this procedure to fill a triangle.

You can use the GetPattern and GetIndPattern routines, described on page 3-122 and page 3-123, respectively, to get a pattern stored in a resource. The patCopy pattern mode is described in "Boolean Transfer Modes With 1-Bit Pixels" beginning on page 3-7. The Pattern record is described on page 3-36.

You can use the PaintPoly procedure, described in the previous section, to draw the interior of a polygon with the pen pattern for the current graphics port. To fill a polygon with a pixel pattern, use the FillCPoly procedure, which is described in the chapter "Color QuickDraw."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996