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.
GpiFillPath (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPATHS
LONG GpiFillPath(hps, idPath, flFill)
HPS hps; /* presentation-space handle */
LONG idPath; /* identifier of path */
LONG flFill; /* fill mode */
The GpiFillPath function draws the interior of the path specified by idPath
by filling it with the current fill pattern. The function first closes any
open figures in the path, then fills the closed figures using the filling
mode specified by flFill. Finally, the function deletes the path.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
idPath Specifies the path whose interior is to be drawn; it must equal
1.
flFill Specifies the fill option. It can be one of the following
values:
Value Meaning
─────────────────────────────────────────────────────────────────
FPATH_ALTERNATE Fills the path using the alternate (even/odd)
rule.
FPATH_WINDING Fills the path using the winding rule.
The default is FPATH_ALTERNATE.
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_FILL_PATH_OPTIONS
PMERR_INV_HPS
PMERR_INV_PATH_ID
PMERR_PATH_UNKNOWN
PMERR_PS_BUSY
Example
This example uses the GpiFillPath function to draw the interior of the given
path. The path, an isosceles triangle, is not closed when it is created, so
the GpiFillPath function closes it before filling.
POINTL ptlStart = { 0, 0 };
POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 };
GpiBeginPath(hps, 1L); /* create a path */
GpiMove(hps, &ptlStart);
GpiPolyLine(hps, 3L, ptlTriangle);
GpiEndPath(hps);
GpiFillPath(hps, 1L, FPATH_ALTERNATE); /* fill the path */
See Also
GpiBeginPath, GpiEndPath, WinGetLastError
♦