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 Regions

After defining a region by using the NewRgn function and OpenRgn procedure, a number of drawing procedures, and the CloseRgn procedure, you can draw the region's outline with the FrameRgn procedure. You can draw its interior with the PaintRgn and FillRgn procedures. You can erase it by using the EraseRgn procedure, and you can use the InvertRgn procedure to reverse the colors of the pixels within it. In all of these procedures, you refer to a region by the handle returned by the NewRgn function 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 FrameRgn procedure in particular requires that there would be no more than 25 such intersections.

Subtopics
FrameRgn
PaintRgn
FillRgn
EraseRgn
InvertRgn

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996