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.
GpiPointArc (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
LONG GpiPointArc(hps, pptl)
HPS hps;         /* presentation-space handle       */
PPOINTL pptl;    /* address of structure for points */
 
The GpiPointArc function draws an arc through three points. The function
uses the current arc parameters to determine the shape of the arc, then
starts the arc at the current position, draws it through the first point
specified by pptl, and ends the arc at the second point specified by pptl.
 
The GpiPointArc function moves the current position to the end point of the
point arc.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
pptl       Points to a POINTL structure that contains intermediate and end
           points.
 
Return Value
 
The return value is GPI_OK or GPI_HITS if the function is successful (it is
GPI_HITS if the detectable attribute is set for the presentation space and a
correlation hit occurs). The return value is 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 GpiPointArc function to draw an arc through the three
points of a triangle. The GpiPolyLine function then draws the triangle:
 
POINTL ptlTriangle[] = { 0, 0, 100, 100, 200, 0 };
 
GpiMove(hps, &ptlTriangle[0]);      /* moves to start point (0, 0) */
GpiPointArc(hps, &ptlTriangle[1]);  /* draws the arc               */
GpiMove(hps, &ptlTriangle[0]);      /* moves to start point (0, 0) */
GpiPolyLine(hps, &ptlTriangle[1]);  /* draws the triangle          */
 
See Also
 
GpiFullArc, GpiMove, GpiQueryArcParams, GpiSetArcParams, GpiSetAttrs,
GpiSetColor, GpiSetCurrentPosition, GpiSetLineType, POINTL