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.
GpiCloseFigure (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPATHS
BOOL GpiCloseFigure(hps)
HPS hps; /* presentation-space handle */
The GpiCloseFigure function closes an open figure in a path bracket. A
figure is open unless it is explicitly closed by using the GpiCloseFigure
function. A figure can be open even if the current point and the starting
point of the figure are equal.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
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_HPS
PMERR_PS_BUSY
Example
This example uses the GpiCloseFigure function to close a triangle drawn in a
path bracket. The triangle starts at (0,0). Since the current position just
before the GpiCloseFigure is (200,0), the function closes the triangle by
drawing a line from (200,0) to (0,0).
HPS hps;
POINTL ptlStart = { 0, 0 };
POINTL ptlPoints[] = { 100, 100, 200, 0 };
GpiBeginPath(hps, 1L); /* start the path bracket */
GpiMove(hps, &ptlStart); /* move to starting point */
GpiPolyLine(hps, 2L, ptlPoints); /* draw the three sides */
GpiCloseFigure(hps); /* close the triangle */
GpiEndPath(hps); /* end the path bracket */
See Also
GpiBeginPath, GpiEndPath
♦