PathCloseFigure Method

Closes the current figure. If the current figure is empty or already closed, this method has no effect.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public Path CloseFigure()

Return Value

Path
This Path instance.

Remarks

Closing a figure means that the last point of the figure will be connected to the first point of the figure. This makes a different from StartFigure only when the Path is drawn, because filling always treats the figures as if they were closed.

After calling this method the next added element will always start a new figure.

A single point or a line section is always interpreted as an open figure. If the current figure has only a point or a single line, this method has the same effect as StartFigure.

See Also