The functions that create and define the path always are bracketed by the GpiBeginPath and GpiEndPath functions. Only one path can be defined between these two functions. However, within the path, there can be any number of figures.
GpiBeginPath signals the start of a path definition. Each path you define becomes the current path and replaces any existing path in the presentation space. The current position is not changed by GpiBeginPath, although it is updated by any drawing instructions that follow.
GpiBeginPath accepts as input only a path identifier of 1. This identifier is used by the functions performing path operations to identify the path.
Due to the number of different operations that can be performed on paths, the path definition can contain both open and closed figures. If a figure does not start and end at the same coordinate point, it is classified as an open figure. Unlike an area bracket, if you use GpiSetCurrentPosition or GpiMove within a path definition, the current figure is not automatically closed.
The PM provides a method of closing figures within a path. GpiCloseFigure (valid only in path brackets) closes a figure in the path whose start and end points are not the same, by drawing a straight line from the current position to the start position of the figure. Use GpiCloseFigure if you want the line join attribute to be applied between the start and end point of a figure. Do not use it if you want the line end attributes to be used as the start and end points for a geometric wide line.
If the path definition contains full arc or box primitives, however, you must not close them using GpiCloseFigure. GpiBox and GpiFullArc generate completely closed figures and must not be used within another figure definition.
To signal the end of the current path definition, use GpiEndPath. The path definition is constructed in the currently associated presentation space. The current position always is updated to the end point of the last line drawn.
The functions that generate a path are enclosed in a path bracket. Applications can use the functions in the following list within a path bracket.
Warning. Some GPI functions cannot be used while an open path definition exists. In particular, you cannot include image or area primitives in a path definition.