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


MapPoly

To map and scale a polygon within one rectangle to another rectangle, use the MapPoly procedure.

PROCEDURE MapPoly (poly: PolyHandle; srcRect,dstRect:\xDDRect);
poly
A handle to a polygon. Upon input, this is the polygon to map. Upon completion, this polygon is the one mapped to a new location.
srcRect
The rectangle containing the polygon.
dstRect
The rectangle in which the new region will be mapped.
DESCRIPTION
The MapPoly procedure takes a polygon within one rectangle and maps and scales it to another rectangle. In the poly parameter, you specify a handle to a polygon that lies within the rectangle that you specify in the srcRect parameter. By calling the MapPt procedure to map all the points that define the polygon specified in the poly parameter, MapPoly maps and scales it to the rectangle that you specify in the dstRect parameter. The MapPoly procedure returns the result in the polygon whose handle you initially passed in the poly parameter.

Similar to the MapRgn procedure described in the previous section, the MapPoly procedure is useful for determining whether a polygon operation will exceed available memory.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996