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 / 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:\xDDRect; srcRect,dstRect:\xDDRect);
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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996