Important: The information in this document is obsolete and should not be used for new development.
Drawing PolygonsAfter defining a polygon by using the
OpenPolyfunction, a number of line-drawing procedures, and the
ClosePolyprocedure, you can draw the polygon's outline with the
FramePolyprocedure. You can draw its interior with the
FillPolyprocedures. You can erase its interior by using the
ErasePolyprocedure, and you can use the
InvertPolyprocedure to reverse the colors of the pixels within it. In all of these procedures, you refer to a polygon by the handle returned by
OpenPolywhen you first created the polygon.
Four of these procedures--
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
MapPolyprocedure (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.