Important: The information in this document is obsolete and should not be used for new development.
Drawing Regions
After defining a region by using theNewRgnfunction andOpenRgnprocedure, a number of drawing procedures, and theCloseRgnprocedure, you can draw the region's outline with theFrameRgnprocedure. You can draw its interior with thePaintRgnandFillRgnprocedures. You can erase it by using theEraseRgnprocedure, and you can use theInvertRgnprocedure to reverse the colors of the pixels within it. In all of these procedures, you refer to a region by the handle returned by theNewRgnfunction when you first created the region.These routines depend on the local coordinate system of the current graphics port. If you draw a region in a graphics port different from the one in which you defined the region, it may not appear in the proper position in the graphics port.
- WARNING
- If any horizontal or vertical line drawn through the region would intersect the region's outline more than 50 times, the results of these graphics operations are undefined. The
FrameRgnprocedure in particular requires that there would be no more than 25 such intersections.![]()
Subtopics
- FrameRgn
- PaintRgn
- FillRgn
- EraseRgn
- InvertRgn