GpiEndPath: Difference between revisions
Appearance
mNo edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns:Success indicator. | ;rc ([[BOOL]]) - returns:Success indicator. | ||
:*TRUE Successful completion | :*TRUE Successful completion | ||
:*FALSE Error occurred. | :*FALSE Error occurred. | ||
Line 38: | Line 38: | ||
==Related Functions== | ==Related Functions== | ||
*GpiFillPath | * [[GpiFillPath]] | ||
*GpiModifyPath | * [[GpiModifyPath]] | ||
*GpiOutlinePath | * [[GpiOutlinePath]] | ||
*GpiPathToRegion | * [[GpiPathToRegion]] | ||
*GpiPop | * [[GpiPop]] | ||
*GpiSetAttrMode | * [[GpiSetAttrMode]] | ||
*GpiSetAttrs | * [[GpiSetAttrs]] | ||
*GpiSetBackColor | * [[GpiSetBackColor]] | ||
*GpiSetBackMix | * [[GpiSetBackMix]] | ||
*GpiSetClipPath | * [[GpiSetClipPath]] | ||
*GpiSetColor | * [[GpiSetColor]] | ||
*GpiSetDefAttrs | * [[GpiSetDefAttrs]] | ||
*GpiSetLineEnd | * [[GpiSetLineEnd]] | ||
*GpiSetLineJoin | * [[GpiSetLineJoin]] | ||
*GpiSetLineType | * [[GpiSetLineType]] | ||
*GpiSetLineWidth | * [[GpiSetLineWidth]] | ||
*GpiSetLineWidthGeom | * [[GpiSetLineWidthGeom]] | ||
*GpiSetMix | * [[GpiSetMix]] | ||
*GpiStrokePath | * [[GpiStrokePath]] | ||
[[Category:Gpi]] | [[Category:Gpi]] |
Latest revision as of 19:34, 7 April 2025
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.
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 */