Important: The information in this document is obsolete and should not be used for new development.
Drawing Polygons
After defining a polygon by using theOpenPoly
function, a number of line-drawing procedures, and theClosePoly
procedure, you can draw the polygon's outline with theFramePoly
procedure. You can draw its interior with thePaintPoly
andFillPoly
procedures. You can erase its interior by using theErasePoly
procedure, and you can use theInvertPoly
procedure to reverse the colors of the pixels within it. In all of these procedures, you refer to a polygon by the handle returned byOpenPoly
when you first created the polygon.Four of these procedures--
PaintPoly
,ErasePoly
,InvertPoly
, andFillPoly
-- 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 functionGetHandleSize
, and multiplying that value by the factor by which you scaled the polygon.
- WARNING
- 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.
Subtopics
- FramePoly
- PaintPoly
- FillPoly
- ErasePoly
- InvertPoly