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 2 - Basic QuickDraw / Basic QuickDraw Reference
Routines / Manipulating Points in Graphics Ports


GlobalToLocal

To convert the coordinates of a point from global coordinates to the local coordinates of the current graphics port (basic or color), use the GlobalToLocal procedure.

PROCEDURE GlobalToLocal (VAR pt: Point);
pt
The point whose global coordinates are to be converted to local coordinates.
DESCRIPTION
The GlobalToLocal procedure takes a point expressed in global coordinates (where the upper-left corner of the main screen has coordinates [0,0]) and converts it into the local coordinates of the current graphics port.

SEE ALSO
Listing 2-4 on page 2-17 illustrates how to use GlobalToLocal to convert a point in an event reported by the Event Manager function WaitNextEvent to local coordinates as required by the Control Manager function FindControl.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996