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

Drawing Polygons

After defining a polygon by using the OpenPoly function, a number of line-drawing procedures, and the ClosePoly procedure, you can draw the polygon's outline with the FramePoly procedure. You can draw its interior with the PaintPoly and FillPoly procedures. You can erase its interior by using the ErasePoly procedure, and you can use the InvertPoly procedure to reverse the colors of the pixels within it. In all of these procedures, you refer to a polygon by the handle returned by OpenPoly when you first created the polygon.

Four of these procedures--PaintPoly, ErasePoly, InvertPoly, and FillPoly-- temporarily convert the polygon into a region to perform their operations. The amount of memory required for this temporary region may be far greater than the amount required by the polygon alone.

You can estimate the size of this region by scaling down the polygon with the MapPoly procedure (described on page 3-104), converting the polygon into a region, checking the region's size with the Memory Manager function GetHandleSize, and multiplying that value by the factor by which you scaled the polygon.

The results of these graphics operations are undefined whenever any horizontal or vertical line drawn through the polygon would intersect the polygon's outline more than 50 times.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996