Important: The information in this document is obsolete and should not be used for new development.
LocalToGlobal
To convert a point's coordinates from the local coordinates of the current graphics port (basic or color) to global coordinates, use theLocalToGlobal
procedure.
PROCEDURE LocalToGlobal (VAR pt:\xDDPoint);
pt
- The point whose local coordinates are to be converted to global coordinates.
DESCRIPTION
TheLocalToGlobal
procedure converts the given point from the current graphics port's local coordinate system into the global coordinate system (where the upper-left corner of the main screen has coordinates [0,0]). This global point can then be compared to other global points, or it can be changed into the local coordinates of another graphics port.Because a rectangle is defined by two points, you can convert a rectangle into global coordinates with two calls to
LocalToGlobal
. In conjunction withLocalToGlobal
, you can use theOffsetRect
,OffsetRgn
, orOffsetPoly
procedures (which are described in the chapter "QuickDraw Drawing") to convert a rectangle, region, or polygon into global coordinates.