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 / Creating and Managing Regions


InsetRgn

To shrink or expand a region, use the InsetRgn procedure.

PROCEDURE InsetRgn (rgn:\xDDRgnHandle; dh,dv:\xDDInteger);
rgn
A handle to the region to alter.
dh
The horizontal distance to move points on the left and right boundaries in toward or outward from the center.
dv
The vertical distance to move points on the top and bottom boundaries in toward or outward from the center.
DESCRIPTION
The InsetRgn procedure moves all points on the region boundary of the region whose handle you pass in the rgn parameter inward by the vertical distance that you specify in the dv parameter and by the horizontal distance that you specify in the dh parameter. If you specify negative values for dh or dv, the InsetRgn procedure moves the points outward in that direction.

The InsetRgn procedure leaves the region's center at the same position, but moves the outline in (for positive values of dh and dv) or out (for negative values of dh and dv). Using InsetRgn on a rectangular region has the same effect as using the InsetRect procedure.

SPECIAL CONSIDERATIONS
The InsetRgn procedure temporarily uses heap space that's twice the size of the original region.

The InsetRgn procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996