Represents a series of connected lines and curves. This class cannot be inherited.
For a list of all members of this type, see GraphicsPath Members.
[Visual Basic] NotInheritable Public Class GraphicsPath Inherits MarshalByRefObject Implements ICloneable, IDisposable [C#] public sealed class GraphicsPath : MarshalByRefObject, ICloneable, IDisposable [C++] public __gc __sealed class GraphicsPath : public MarshalByRefObject, ICloneable, IDisposable [JScript] public class GraphicsPath extends MarshalByRefObject implements ICloneable, IDisposable
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Applications use paths to draw outlines of shapes, fill the interiors of shapes, and create clipping regions. The graphics engine maintains the coordinates of geometric shapes in a path in world coordinate space.
A path may be composed of any number of figures (subpaths). Each figure is either composed of a sequence of connected lines and curves or a geometric shape primitive. The starting point of a figure is the first point in the sequence of connected lines and curves. The ending point is the last point in the sequence. The starting and ending points of a geometric shape primitive are defined by the primitive specification.
A figure that consists of a sequence of connected lines and curves (whose starting and ending points may be coincident) is an open figure, unless it is closed explicitly. A figure can be closed explicitly, by using the CloseFigure method, which closes the current figure by connecting a line from the ending point to the starting point. A figure that consists of a geometric shape primitive is a closed figure.
For purposes of filling and clipping (for example, if a path is rendered using Graphics.FillPath), all open figures are closed by adding a line from the figure's first point to its last point.
A new figure is implicitly started when a path is created or when a figure is closed. A new figure is explicitly when the StartFigure method is called.
When a geometric shape primitive is added to a path, it adds a figure containing the geometric shape, and also implicitly starts a new figure. Consequently, there is always a current figure in a path. When lines and curves are added to a path, an implicit line is added as needed to connect the ending point of the current figure to the starting point of the new lines and curves to form a sequence of connected lines and curves.
A figure has a direction that describes how line and curve segments are traced between the starting point and the ending point. The direction is defined in the order that lines and curves are added to a figure, or is defined by the geometric shape primitive. The direction is used in determining the path interiors for clipping and fill.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: System.Drawing (in System.Drawing.dll)