- Inside Macintosh: Imaging With QuickDraw /
- Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
- Routines / Scaling and Mapping Points, Rectangles, Polygons, and Regions
MapRect
To map and scale a rectangle within one rectangle to another rectangle, use the MapRect procedure.
PROCEDURE MapRect (VAR r:�Rect; srcRect,dstRect:�Rect);
r
- Upon input, the rectangle to map; upon completion, the mapped rectangle.
srcRect
- The rectangle containing the rectangle to map.
dstRect
- The rectangle in which the new rectangle will be mapped.
DESCRIPTION
The MapRect procedure takes a rectangle within one rectangle and maps and scales it to another rectangle. In the r parameter, you specify a rectangle that lies within the rectangle that you specify in the srcRect parameter. By calling the MapPt procedure to map the upper-left and lower-right corners of the rectangle in the r parameter, MapRect maps and scales it to the rectangle that you specify in the dstRect parameter. The MapRect procedure returns the newly mapped rectangle in the r parameter.
© Apple Computer, Inc.
7 JUL 1996