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.
GpiMove (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiMove(hps, pptl)
HPS hps;         /* presentation-space handle             */
PPOINTL pptl;    /* address of structure for new position */
 
The GpiMove function moves the current position to the specified point. When
used in an area bracket, the function closes the current open figure (if
any) and marks the start of a new figure.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
pptl       Points to a POINTL structure containing the position to move to.
 
Return Value
 
The return value is GPI_OK or GPI_ERROR if an error occurs.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_COORDINATE
     PMERR_INV_HPS
     PMERR_PS_BUSY
 
Example
 
This example uses the GpiMove function to draw an X. The function moves the
current position to the starting point of each leg of the character.
 
POINTL ptl[4] = { 0, 0, 100, 100, 0, 100, 100, 0 };
 
GpiMove(hps, &ptl[0]);    /* move to (0,0)   */
GpiLine(hps, &ptl[1]);
GpiMove(hps, &ptl[2]);    /* move to (0,100) */
GpiLine(hps, &ptl[3]);
 
See Also
 
GpiCharString, GpiCharStringAt, GpiCharStringPos, GpiCharStringPosAt,
GpiFullArc, GpiLine, GpiMarker, GpiPartialArc, GpiPointArc, GpiPolyFillet,
GpiPolyFilletSharp, GpiPolyLine, GpiPolyMarker, GpiPolySpline,
GpiSetCurrentPosition, POINTL