Path Creation

To create a path and select it into a DC, it is first necessary to define the points that describe it. This is done by calling the BeginPath function, specifying the appropriate drawing functions, and then by calling the EndPath function. This combination of functions (BeginPath, drawing functions, and EndPath) constitute a path bracket. The following is the list of drawing functions that can be used.

When an application calls EndPath, the system selects the associated path into the specified DC. (If another path had previously been selected into the DC, the system deletes that path without saving it.) After the system selects the path into the DC, an application can operate on the path in one of the following ways:

  • Draw the outline of the path (using the current pen).
  • Paint the interior of the path (using the current brush).
  • Draw the outline and fill the interior of the path.
  • Modify the path (converting curves to line segments).
  • Convert the path into a clip path.
  • Convert the path into a region.
  • Flatten the path by converting each curve in the path into a series of line segments.
  • Retrieve the coordinates of the lines and curves that compose a path.