CloseFigure

  BOOL CloseFigure(hdc)    
  HDC hdc;    

The CloseFigure function closes an open figure in a path. It should only be called when there is an active path associated with the DC, started by a BeginPath call.

A figure in a path is open unless it is explicitly closed using CloseFigure. A figure can be open even if the current point and the starting point of the figure are the same.

This function closes the figure by drawing a line from the current position to the first point of the figure (usually, the point specified by the most recent MoveTo call), and connects the lines using the line join style. If a figure is closed using LineTo instead of CloseFigure, end caps will be used to create the corner instead of a join.

Any line or curve added to the path after CloseFigure starts a new figure.

Parameters

hdc

Identifies the DC.

Return Value

The return value is TRUE if the call succeeded, otherwise FALSE.

Comment

CloseFigure can only be used in a path bracket, started by calling BeginPath.

See Also

BeginPath, EndPath, ExtCreatePen