# GraphicsPath Class

A GraphicsPath object stores a sequence of lines, curves, and shapes. You can draw the entire sequence by calling the
**DrawPath** method of a
Graphics object. You can partition the sequence of lines, curves, and shapes into figures, and with the help of a
GraphicsPathIterator object, you can draw selected figures. You can also place markers in the sequence, so that you can draw selected portions of the path.

## Methods

The **GraphicsPath** class has these methods.

Method | Description |
---|---|

GraphicsPath::AddArc | This topic lists the AddArc methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddArc | The GraphicsPath::AddArc method adds an elliptical arc to the current figure of this path. |

GraphicsPath::AddArc | The GraphicsPath::AddArc method adds an elliptical arc to the current figure of this path. |

GraphicsPath::AddArc | The GraphicsPath::AddArc method adds an elliptical arc to the current figure of this path. |

GraphicsPath::AddBezier | This topic lists the AddBezier methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddBezier | The GraphicsPath::AddBezier method adds a Bézier spline to the current figure of this path. |

GraphicsPath::AddBezier | The GraphicsPath::AddBezier method adds a Bézier spline to the current figure of this path. |

GraphicsPath::AddBezier | The GraphicsPath::AddBezier method adds a Bézier spline to the current figure of this path. |

GraphicsPath::AddBeziers | This topic lists the AddBeziers methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddBeziers | The GraphicsPath::AddBeziers method adds a sequence of connected Bézier splines to the current figure of this path. |

GraphicsPath::AddClosedCurve | This topic lists the AddClosedCurve methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddClosedCurve | The GraphicsPath::AddClosedCurve method adds a closed cardinal spline to this path. |

GraphicsPath::AddClosedCurve | The GraphicsPath::AddClosedCurve method adds a closed cardinal spline to this path. |

GraphicsPath::AddClosedCurve | The GraphicsPath::AddClosedCurve method adds a closed cardinal spline to this path. |

GraphicsPath::AddCurve | This topic lists the AddCurve methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddCurve | The GraphicsPath::AddCurve method adds a cardinal spline to the current figure of this path. |

GraphicsPath::AddCurve | The GraphicsPath::AddCurve method adds a cardinal spline to the current figure of this path. |

GraphicsPath::AddCurve | The GraphicsPath::AddCurve method adds a cardinal spline to the current figure of this path. |

GraphicsPath::AddCurve | The GraphicsPath::AddCurve method adds a cardinal spline to the current figure of this path. |

GraphicsPath::AddCurve | The GraphicsPath::AddCurve method adds a cardinal spline to the current figure of this path. |

GraphicsPath::AddEllipse | This topic lists the AddEllipse methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddEllipse | The GraphicsPath::AddEllipse method adds an ellipse to this path. |

GraphicsPath::AddEllipse | The GraphicsPath::AddEllipse method adds an ellipse to this path. |

GraphicsPath::AddEllipse | The GraphicsPath::AddEllipse method adds an ellipse to this path. |

GraphicsPath::AddLine | This topic lists the AddLine methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddLine | The GraphicsPath::AddLine method adds a line to the current figure of this path. |

GraphicsPath::AddLine | The GraphicsPath::AddLine method adds a line to the current figure of this path. |

GraphicsPath::AddLine | The GraphicsPath::AddLine method adds a line to the current figure of this path. |

GraphicsPath::AddLines | This topic lists the AddLines methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddLines | The GraphicsPath::AddLines method adds a sequence of connected lines to the current figure of this path. |

GraphicsPath::AddPath | The GraphicsPath::AddPath method adds a path to this path. |

GraphicsPath::AddPie | This topic lists the AddPie methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddPie | The GraphicsPath::AddPie method adds a pie to this path. |

GraphicsPath::AddPie | The GraphicsPath::AddPie method adds a pie to this path. |

GraphicsPath::AddPie | The GraphicsPath::AddPie method adds a pie to this path. |

GraphicsPath::AddPolygon | This topic lists the AddPolygon methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddPolygon | The GraphicsPath::AddPolygon method adds a polygon to this path. |

GraphicsPath::AddRectangle | This topic lists the AddRectangle methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddRectangle | The GraphicsPath::AddRectangle method adds a rectangle to this path. |

GraphicsPath::AddRectangles | This topic lists the AddRectangles methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddRectangles | The GraphicsPath::AddRectangles method adds a sequence of rectangles to this path |

GraphicsPath::AddString | This topic lists the AddString methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::AddString | The GraphicsPath::AddString method adds the outline of a string to this path. |

GraphicsPath::AddString | The GraphicsPath::AddString method adds the outlines of a string to this path. |

GraphicsPath::AddString | The GraphicsPath::AddString method adds the outline of a string to this path. |

GraphicsPath::ClearMarkers | The GraphicsPath::ClearMarkers method clears the markers from this path. |

GraphicsPath::Clone | The GraphicsPath::Clone method creates a new GraphicsPath object, and initializes it with the contents of this GraphicsPath object. |

GraphicsPath::CloseAllFigures | The GraphicsPath::CloseAllFigures method closes all open figures in this path. |

GraphicsPath::CloseFigure | The GraphicsPath::CloseFigure method closes the current figure of this path. |

GraphicsPath::Flatten | The GraphicsPath::Flatten method applies a transformation to this path and converts each curve in the path to a sequence of connected lines. |

GraphicsPath::GetBounds | This topic lists the GetBounds methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::GetBounds | The GraphicsPath::GetBounds method gets a bounding rectangle for this path. |

GraphicsPath::GetFillMode | The GraphicsPath::GetFillMode method gets the fill mode of this path. |

GraphicsPath::GetLastPoint | The GraphicsPath::GetLastPoint method gets the ending point of the last figure in this path. |

GraphicsPath::GetLastStatus | The GraphicsPath::GetLastStatus method returns a value that indicates the nature of this GraphicsPath object's most recent method failure. |

GraphicsPath::GetPathData | The GraphicsPath::GetPathData method gets an array of points and an array of point types from this path. Together, these two arrays define the lines, curves, figures, and markers of this path. |

GraphicsPath::GetPathPoints | This topic lists the GetPathPoints methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::GetPathPoints | The GraphicsPath::GetPathPoints method gets this path's array of points. The array contains the endpoints and control points of the lines and Bézier splines that are used to draw the path. |

GraphicsPath::GetPathTypes | The GraphicsPath::GetPathTypes method gets this path's array of point types. |

GraphicsPath::GetPointCount | The GraphicsPath::GetPointCount method gets the number of points in this path's array of data points. This is the same as the number of types in the path's array of point types. |

GraphicsPath::GraphicsPath | Creates a GraphicsPath::GraphicsPath object and initializes the fill mode. This is the default constructor. |

GraphicsPath::GraphicsPath | Creates a GraphicsPath::GraphicsPath object based on an array of points, an array of types, and a fill mode. |

GraphicsPath::GraphicsPath | Creates a GraphicsPath::GraphicsPath object based on an array of points, an array of types, and a fill mode. |

GraphicsPath::GraphicsPath | This topic lists the constructors of the GraphicsPath class. For a complete class listing, see GraphicsPath Class. |

GraphicsPath::GraphicsPath | This topic lists the constructors of the GraphicsPath class. For a complete class listing, see GraphicsPath Class. |

GraphicsPath::IsOutlineVisible | This topic lists the IsOutlineVisible methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::IsOutlineVisible | The GraphicsPath::IsOutlineVisible method determines whether a specified point touches the outline of this path when the path is drawn by a specified Graphics object and a specified pen. |

GraphicsPath::IsOutlineVisible | The GraphicsPath::IsOutlineVisible method determines whether a specified point touches the outline of this path when the path is drawn by a specified Graphicsobject and a specified pen. |

GraphicsPath::IsOutlineVisible | The GraphicsPath::IsOutlineVisible method determines whether a specified point touches the outline of this path when the path is drawn by a specified Graphics object and a specified pen. |

GraphicsPath::IsVisible | This topic lists the IsVisible methods of the GraphicsPath class. For a complete list of methods for the GraphicsPath class, see GraphicsPath. |

GraphicsPath::IsVisible | The GraphicsPath::IsVisible method determines whether a specified point lies in the area that is filled when this path is filled by a specified Graphics object. |

GraphicsPath::IsVisible | The GraphicsPath::IsVisible method determines whether a specified point lies in the area that is filled when this path is filled by a specified Graphics object. |

GraphicsPath::IsVisible | The GraphicsPath::IsVisible method determines whether a specified point lies in the area that is filled when this path is filled by a specified Graphicsobject. |

GraphicsPath::Outline | The GraphicsPath::Outline method transforms and flattens this path, and then converts this path's data points so that they represent only the outline of the path. |

GraphicsPath::Reset | The GraphicsPath::Reset method empties the path and sets the fill mode to FillModeAlternate. |

GraphicsPath::Reverse | The GraphicsPath::Reverse method reverses the order of the points that define this path's lines and curves. |

GraphicsPath::SetFillMode | The GraphicsPath::SetFillMode method sets the fill mode of this path. |

GraphicsPath::SetMarker | The GraphicsPath::SetMarker method designates the last point in this path as a marker point. |

GraphicsPath::StartFigure | The GraphicsPath::StartFigure method starts a new figure without closing the current figure. Subsequent points added to this path are added to the new figure. |

GraphicsPath::Transform | The GraphicsPath::Transform method multiplies each of this path's data points by a specified matrix. |

GraphicsPath::Warp | The GraphicsPath::Warp method applies a warp transformation to this path. The GraphicsPath::Warp method also flattens (converts to a sequence of straight lines) the path. |

GraphicsPath::Widen | The GraphicsPath::Widen method replaces this path with curves that enclose the area that is filled when this path is drawn by a specified pen. The GraphicsPath::Widen method also flattens the path. |

## Remarks

A path consists of one or more figures. As you add lines and curves to a path, those lines and curves become part of a figure. You can start a new figure by calling the GraphicsPath::StartFigure method. When you draw a path, the lines and curves within an individual figure are connected by straight lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No connecting line is drawn between the end of one figure and the start of the next figure.

A figure can be open or closed. You can close a figure by calling the GraphicsPath::CloseFigure method. After you call **GraphicsPath::CloseFigure**, the next line, curve, or shape that you add to the path is part of the next figure. When you draw a path, the ending point of each closed figure is automatically connected to the starting point of that figure.

Some shapes (for example, rectangles and ellipses) are intrinsically closed. When you add an intrinsically closed shape to a path, that shape is in a figure by itself, and that figure is considered closed even if you don't call GraphicsPath::CloseFigure. The following methods add intrinsically closed figures to a path:

- AddClosedCurve Methods
- AddEllipse Methods
- AddPie Methods
- AddPolygon Methods
- AddRectangle Methods
- AddRectangles Methods
- AddString Methods

## Requirements

Target Platform |
Windows |

Header |
gdipluspath.h |