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: QuickDraw GX Environment and Utilities /
Chapter 1 - QuickDraw GX and the Macintosh Environment / QuickDraw GX and the Macintosh Environment Reference
Macintosh Interface Functions / Converting From QuickDraw to QuickDraw GX Coordinates


GXConvertQDPoint

You can use the GXConvertQDPoint function to convert from QuickDraw global coordinates to QuickDraw GX coordinates.

void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, 
                     gxPoint *fixedPt);
shortPt
A pointer to a point in QuickDraw global coordinates that is to be converted to QuickDraw GX coordinate space.
portOrder
A reference to a view port. If this parameter is nil, the conversion is to QuickDraw GX global coordinates; if it is other than nil, the conversion is to the local coordinates of that view port.
fixedPt
A pointer to a gxPoint structure. On return, the structure contains the result of the coordinate conversion.
DESCRIPTION
The GXConvertQDPoint function converts a point with QuickDraw global coordinates to a point with QuickDraw GX coordinates. If the portOrder parameter is nil, the QuickDraw global coordinates are converted to QuickDraw GX global coordinates. If the portOrder parameter is specified, the QuickDraw global coordinates are converted to QuickDraw GX local coordinates. The local coordinates are local within the specified view port.

The QuickDraw global coordinates are specified in pixels. The QuickDraw GX global and local coordinates are specified in a coordinate space in which 1.0 = 1/72 inch.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
invalid_viewPort_reference 
Warnings 
point_does_not_intersect_port(debugging version)
SEE ALSO
For more information about converting from QuickDraw to QuickDraw GX coordinate space, see the section "Converting From QuickDraw to QuickDraw GX Coordinates" beginning on page 1-7. For more information about the QuickDraw GX coordinate system and drawing, see the chapter "View-Related Objects" in Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996