GpiEndPath
Appearance
This function ends the specification of a path started by GpiBeginPath.
Syntax
GpiEndPath(hps);
Parameters
- hps (HPS) - input
- Presentation-space handle.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion
- FALSE Error occurred.
Possible returns from WinGetLastError
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_NOT_IN_PATH (0x20E1)
- An attempt was made to end a path using GpiEndPath or during segment drawing while not in a path bracket.
Calling Sequence
#define INCL_GPIPATHS /* Or use INCL_GPI, INCL_PM, */ #include <os2.h> HPS hps; /* Presentation-space handle. */ BOOL rc; /* Success indicator. */ rc = GpiEndPath(hps);
Example Source Code
This example uses the GpiEndPath function to end a path bracket. When the path bracket is ended, a subsequent call to the GpiFillPath function draws and fills the path.
#define INCL_GPIPATHS /* GPI Path functions */ #include <os2.h> HPS hps; /* presentation space handle */ POINTL ptlStart = { 0, 0 }; /* first vertex */ POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 }; /* vertices */ GpiBeginPath(hps, 1L); /* start the path bracket */ GpiMove(hps, &ptlStart); /* move to starting point */ GpiPolyLine(hps, 2L, ptlTriangle); /* draw the three sides */ GpiCloseFigure(hps); /* close the triangle */ GpiEndPath(hps); /* end the path bracket */ GpiFillPath(hps, 1L, FPATH_ALTERNATE); /* draw and fill the path */
Prerequisite Functions
Related Functions
- GpiFillPath
- GpiModifyPath
- GpiOutlinePath
- GpiPathToRegion
- GpiPop
- GpiSetAttrMode
- GpiSetAttrs
- GpiSetBackColor
- GpiSetBackMix
- GpiSetClipPath
- GpiSetColor
- GpiSetDefAttrs
- GpiSetLineEnd
- GpiSetLineJoin
- GpiSetLineType
- GpiSetLineWidth
- GpiSetLineWidthGeom
- GpiSetMix
- GpiStrokePath