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.
GpiModifyPath (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPATHS
BOOL GpiModifyPath(hps, idPath, cmdMode)
HPS hps; /* presentation-space handle */
LONG idPath; /* path identifier */
LONG cmdMode; /* modification options */
The GpiModifyPath function modifies a path. Modifying a path affects the way
the GpiFillPath function draws the path. For example, a modified path can be
used to draw a wide line; that is, a line having a width specified by the
current geometric-line width. The function modifies the path as specified by
the cmdMode parameter.
The GpiModifyPath can modify the path for drawing as a wide line. In this
case, the GpiFillPath function draws a line that follows the path. The line
has the current geometric-line width and is filled with the current fill
pattern. Furthermore, the current line-join attribute defines how to draw
the intersection of two lines at their end points and the current line-end
attribute defines how to draw the end of a line, respectively.
GpiModifyPath prevents GpiFillPath from closing open figures in the path.
The line-end attribute applies to the start and end points of open figures.
If a figure is closed by using the GpiCloseFigure function, the line-join
attribute applies to the start and end points. If a line is joined to an
arc, the line-join attribute applies to the intersection at the end points.
If two lines intersect at any place other than their end points, the
GpiFillPath function draws the wide line so that the intersection is filled
despite the fill mode.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
idPath Specifies the identifier of the path to modify; it must be 1.
cmdMode Specifies how to modify the path. It can be the following value:
Value Meaning
─────────────────────────────────────────────────────────────────
MPATH_STROKE Converts the path to a wide line. The line width is
the current geometric-line width set by using the
GpiSetLineWidthGeom function.
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_INV_MODIFY_PATH_MODE
PMERR_INV_PATH_ID
PMERR_PATH_UNKNOWN
PMERR_PS_BUSY
Example
This example uses the GpiModifyPath function to modify the given path. The
GpiFillPath function then draws the path.
POINTL ptlStart = { 0, 0 };
POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 };
GpiBeginPath(hps, 1L); /* creates path */
GpiMove(hps, &ptlStart);
GpiPolyLine(hps, 3L, ptlTriangle);
GpiEndPath(hps);
GpiModifyPath(hps,
1L,
MPATH_STROKE); /* modifies path for wide line */
GpiFillPath(hps, 1L, FPATH_ALTERNATE); /* draws the wide line */
See Also
GpiBeginPath, GpiCloseFigure, GpiEndPath, GpiSetLineEnd, GpiSetLineJoin,
GpiSetLineWidthGeom, WinGetLastError
♦