Important: The information in this document is obsolete and should not be used for new development.
MapRgn
To map and scale a region within one rectangle to another rectangle, use theMapRgn
procedure.
PROCEDURE MapRgn (rgn:\xDDRgnHandle; srcRect,dstRect:\xDDRect);
rgn
- A handle to a region. Upon input, this is the region to map. Upon completion, this region is the one mapped to a new location.
srcRect
- The rectangle containing the region to map.
dstRect
- The rectangle in which the new region will be mapped.
DESCRIPTION
TheMapRgn
procedure takes a region within one rectangle and maps and scales it to another rectangle. In thergn
parameter, you specify a handle to a region that lies within the rectangle that you specify in thesrcRect
parameter. By calling theMapPt
procedure to map all the points of the region in thergn
parameter,MapRgn
maps and scales it to the rectangle that you specify in thedstRect
parameter. TheMapRgn
procedure returns the result in the region whose handle you initially passed in thergn
parameter.The
MapRgn
procedure is useful for determining whether a region operation will exceed available memory.\xDD\xDDBy mapping a large region into a smaller one and performing the operation (without actually drawing), you can estimate how much memory will be required by the anticipated operation.SPECIAL CONSIDERATIONS
TheMapRgn
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.