Important: The information in this document is obsolete and should not be used for new development.
LocalToGlobalTo convert a point's coordinates from the local coordinates of the current graphics port (basic or color) to global coordinates, use the
PROCEDURE LocalToGlobal (VAR pt:\xDDPoint);
- The point whose local coordinates are to be converted to global coordinates.
LocalToGlobalprocedure 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 with
LocalToGlobal, you can use the
OffsetPolyprocedures (which are described in the chapter "QuickDraw Drawing") to convert a rectangle, region, or polygon into global coordinates.