gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiConvert (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPITRANSFORMS
 
BOOL GpiConvert(hps, lSrc, lTarg, cPoints, aptl)
HPS hps;         /* presentation-space handle                 */
LONG lSrc;       /* source coordinate space                   */
LONG lTarg;      /* target coordinate space                   */
LONG cPoints;    /* number of coordinate pairs in structure   */
PPOINTL aptl;    /* address of structure for coordinate pairs */
 
The GpiConvert function converts one or more points from one coordinate
space to another. For each POINTL structure in the array pointed to by aptl,
the function replaces the original x- and y-coordinate values with the
converted values.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
lSrc       Specifies the source coordinate space. It can be one of the
           following values:
 
           Value             Meaning
           ─────────────────────────────────────────────────────────────────
           CVTC_DEFAULTPAGE  Page space prior to default viewing transform
 
           CVTC_DEVICE       Device space
 
           CVTC_MODEL        Model space
 
           CVTC_PAGE         Page space after default viewing transform
 
           CVTC_WORLD        World coordinates
 
lTarg      Specifies the target coordinate space. It can be one of the
           following values:
 
           Value             Meaning
           ─────────────────────────────────────────────────────────────────
           CVTC_DEFAULTPAGE  Page space prior to default viewing transform
 
           CVTC_DEVICE       Device space
 
           CVTC_MODEL        Model space
 
           CVTC_PAGE         Page space after default viewing transform
 
           CVTC_WORLD        World coordinates
 
cPoints    Specifies the number of coordinate pairs pointed to by aptl.
 
aptl       Points to an array of POINTL structures containing the coordinate
           pairs.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_COORD_SPACE
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_INV_IN_RETAIN_MODE
     PMERR_INV_LENGTH_OR_COUNT
     PMERR_PS_BUSY
 
See Also
 
GpiSetModelTransformMatrix, GpiSetPageViewport,
GpiSetSegmentTransformMatrix, GpiSetViewingTransformMatrix, POINTL