> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

# GraphicsPath

Namespace: **System.Drawing.Drawing2D**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Represents a series of connected lines and curves. This class cannot be inherited.

{% tabs %}
{% tab title="C#" %}

```csharp
public class GraphicsPath : MarshalByRefObject, ICloneable, IDisposable
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class GraphicsPath
    Inherits MarshalByRefObject
    Implements ICloneable, IDisposable
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath()

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with a [FillMode](#fillmode) value of [Alternate](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md#fields).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath(fillMode)

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with the specified [FillMode](#fillmode) enumeration.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                             |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **fillMode** | [FillMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md) | The [FillMode](#fillmode) enumeration that determines how the interior of this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) is filled. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath(pts, types)

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with the specified [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) array and [Byte](https://docs.microsoft.com/dotnet/api/system.byte) arrays.

| Name      | Type                                                                      | Description                                                                                                                                                                                                                                                            |
| --------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **pts**   | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that defines the coordinates of the points that make up this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md). |
| **types** | [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte)             | An array of [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) enumeration elements that specifies the type of each corresponding point in the *pts* array.                                               |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath(pts, types, fillMode)

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with the specified [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) array and [Byte](https://docs.microsoft.com/dotnet/api/system.byte) arrays.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **pts**      | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf)                             | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that defines the coordinates of the points that make up this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md). |
| **types**    | [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte)                                         | An array of [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) enumeration elements that specifies the type of each corresponding point in the *pts* array.                                                 |
| **fillMode** | [FillMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md) | The [FillMode](#fillmode) enumeration that determines how the interior of this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) is filled.                                                                  |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath(pts, types)

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with the specified [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) and [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) arrays and with the specified [FillMode](#fillmode) enumeration element.

| Name      | Type                                                                    | Description                                                                                                                                                                                                                                                            |
| --------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **pts**   | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that defines the coordinates of the points that make up this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md). |
| **types** | [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte)           | An array of [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) enumeration elements that specifies the type of each corresponding point in the *pts* array.                                               |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GraphicsPath(pts, types, fillMode)

Initializes a new instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class with the specified [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) and [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) arrays and with the specified [FillMode](#fillmode) enumeration element.

| Name         | Type                                                                                                  | Description                                                                                                                                                                                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **pts**      | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point)                               | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that defines the coordinates of the points that make up this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md). |
| **types**    | [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte)                                         | An array of [PathPointType](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathpointtype.md) enumeration elements that specifies the type of each corresponding point in the *pts* array.                                                 |
| **fillMode** | [FillMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md) | The [FillMode](#fillmode) enumeration that determines how the interior of this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) is filled.                                                                  |

## Properties

### ![](/files/gN3G3VR5GgQngV3jdnfJ) FillMode

[FillMode](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md): Gets or sets a [FillMode](#fillmode) enumeration that determines how the interiors of shapes in this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) are filled.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathData

[PathData](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.pathdata.md): Gets a [PathData](#pathdata) that encapsulates arrays of points (points) and types (types) for this GraphicsPath.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathPoints

[PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf): Gets the points in the path.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PathTypes

[Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte): Gets the types of the corresponding points in the [PathPoints](#pathpoints) array.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) PointCount

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Gets the number of elements in the [PathPoints](#pathpoints) or the [PathTypes](#pathtypes) array.

## Methods

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddArc(rect, startAngle, sweepAngle)

Appends an elliptical arc to the current figure.

| Parameter      | Type                                                                          | Description                                                                                                                                                        |
| -------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **rect**       | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) that represents the rectangular bounds of the ellipse from which the arc is taken. |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                 | The starting angle of the arc, measured in degrees clockwise from the x-axis.                                                                                      |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                 | The angle between *startAngle* and the end of the arc.                                                                                                             |

If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc. The arc is traced along the perimeter of the ellipse bounded by the specified rectangle.The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle.The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle.If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddArc(x, y, width, height, startAngle, sweepAngle)

Appends an elliptical arc to the current figure.

| Parameter      | Type                                                          | Description                                                                                                               |
| -------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **x**          | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
| **y**          | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
| **width**      | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The width of the rectangular region that defines the ellipse from which the arc is drawn.                                 |
| **height**     | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The height of the rectangular region that defines the ellipse from which the arc is drawn.                                |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The starting angle of the arc, measured in degrees clockwise from the x-axis.                                             |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The angle between *startAngle* and the end of the arc.                                                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddArc(rect, startAngle, sweepAngle)

Appends an elliptical arc to the current figure.

| Parameter      | Type                                                                        | Description                                                                                                                                                        |
| -------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **rect**       | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) that represents the rectangular bounds of the ellipse from which the arc is taken. |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The starting angle of the arc, measured in degrees clockwise from the x-axis.                                                                                      |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The angle between *startAngle* and the end of the arc.                                                                                                             |

If there are previous lines or curves in the figure, a line is added to connect the endpoint of the previous segment to the beginning of the arc. The arc is traced along the perimeter of the ellipse bounded by the specified rectangle.The starting point of the arc is determined by measuring clockwise from the x-axis of the ellipse (at the 0-degree angle) by the number of degrees in the start angle.The endpoint is similarly located by measuring clockwise from the starting point by the number of degrees in the sweep angle.If the sweep angle is greater than 360 degrees or less than -360 degrees, the arc is swept by exactly 360 degrees or -360 degrees, respectively.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddArc(x, y, width, height, startAngle, sweepAngle)

Appends an elliptical arc to the current figure.

| Parameter      | Type                                                          | Description                                                                                                               |
| -------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **x**          | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The x-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
| **y**          | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The y-coordinate of the upper-left corner of the rectangular region that defines the ellipse from which the arc is drawn. |
| **width**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The width of the rectangular region that defines the ellipse from which the arc is drawn.                                 |
| **height**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The height of the rectangular region that defines the ellipse from which the arc is drawn.                                |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The starting angle of the arc, measured in degrees clockwise from the x-axis.                                             |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The angle between *startAngle* and the end of the arc.                                                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBezier(pt1, pt2, pt3, pt4)

Adds a cubic Bézier curve to the current figure.

| Parameter | Type                                                                | Description                                                                                                                   |
| --------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **pt1**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the starting point of the curve.        |
| **pt2**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the first control point for the curve.  |
| **pt3**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the second control point for the curve. |
| **pt4**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the endpoint of the curve.              |

The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points. If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBezier(x1, y1, x2, y2, x3, y3, x4, y4)

Adds a cubic Bézier curve to the current figure.

| Parameter | Type                                                        | Description                                                 |
| --------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| **x1**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the starting point of the curve.        |
| **y1**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the starting point of the curve.        |
| **x2**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the first control point for the curve.  |
| **y2**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the first control point for the curve.  |
| **x3**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the second control point for the curve. |
| **y3**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the second control point for the curve. |
| **x4**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the endpoint of the curve.              |
| **y4**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the endpoint of the curve.              |

The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points. If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBezier(pt1, pt2, pt3, pt4)

Adds a cubic Bézier curve to the current figure.

| Parameter | Type                                                                  | Description                                                                                                                     |
| --------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **pt1**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the starting point of the curve.        |
| **pt2**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the first control point for the curve.  |
| **pt3**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the second control point for the curve. |
| **pt4**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the endpoint of the curve.              |

The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points. If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBezier(x1, y1, x2, y2, x3, y3, x4, y4)

Adds a cubic Bézier curve to the current figure.

| Parameter | Type                                                          | Description                                                 |
| --------- | ------------------------------------------------------------- | ----------------------------------------------------------- |
| **x1**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the starting point of the curve.        |
| **y1**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the starting point of the curve.        |
| **x2**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the first control point for the curve.  |
| **y2**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the first control point for the curve.  |
| **x3**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the second control point for the curve. |
| **y3**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the second control point for the curve. |
| **x4**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the endpoint of the curve.              |
| **y4**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the endpoint of the curve.              |

The cubic curve is constructed from the first point to the fourth point by using the second and third points as control points. If there is a previous line or curve segment in the figure, a line is added to connect the endpoint of the previous segment to the starting point of the cubic curve.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBeziers(points)

Adds a sequence of connected cubic Bézier curves to the current figure.

| Parameter  | Type                                                                    | Description                                                                                                                                   |
| ---------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curves. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddBeziers(points)

Adds a sequence of connected cubic Bézier curves to the current figure.

| Parameter  | Type                                                                      | Description                                                                                                                                     |
| ---------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curves. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddClosedCurve(points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

| Parameter  | Type                                                                    | Description                                                                                                                                  |
| ---------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddClosedCurve(points, tension)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

| Parameter   | Type                                                                    | Description                                                                                                                                                                        |
| ----------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**  | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curve.                                       |
| **tension** | [Single](https://docs.microsoft.com/dotnet/api/system.single)           | A value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddClosedCurve(points)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

| Parameter  | Type                                                                      | Description                                                                                                                                  |
| ---------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddClosedCurve(points, tension)

Adds a closed curve to this path. A cardinal spline curve is used because the curve travels through each of the points in the array.

| Parameter   | Type                                                                      | Description                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**  | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curve.                                       |
| **tension** | [Single](https://docs.microsoft.com/dotnet/api/system.single)             | A value between from 0 through 1 that specifies the amount that the curve bends between points, with 0 being the smallest curve (sharpest corner) and 1 being the smoothest curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points)

Adds a spline curve to the current figure.

| Parameter  | Type                                                                    | Description                                                                                                                                    |
| ---------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points)

Adds a spline curve to the current figure.

| Parameter  | Type                                                                      | Description                                                                                                                                    |
| ---------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curve. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points, tension)

Adds a spline curve to the current figure.

| Parameter   | Type                                                                    | Description                                                                                                                                    |
| ----------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**  | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curve. |
| **tension** | [Single](https://docs.microsoft.com/dotnet/api/system.single)           | A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.            |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points, tension)

Adds a spline curve to the current figure.

| Parameter   | Type                                                                      | Description                                                                                                                                    |
| ----------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**  | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curve. |
| **tension** | [Single](https://docs.microsoft.com/dotnet/api/system.single)             | A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.            |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points, offset, numberOfSegments, tension)

Adds a spline curve to the current figure.

| Parameter            | Type                                                                    | Description                                                                                                                                  |
| -------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**           | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the curve. |
| **offset**           | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)             | The index of the element in the *points* array that is used as the first point in the curve.                                                 |
| **numberOfSegments** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)             | The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.                                  |
| **tension**          | [Single](https://docs.microsoft.com/dotnet/api/system.single)           | A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.          |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddCurve(points, offset, numberOfSegments, tension)

Adds a spline curve to the current figure.

| Parameter            | Type                                                                      | Description                                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **points**           | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the curve. |
| **offset**           | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)               | The index of the element in the *points* array that is used as the first point in the curve.                                                   |
| **numberOfSegments** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)               | The number of segments used to draw the curve. A segment can be thought of as a line connecting two points.                                    |
| **tension**          | [Single](https://docs.microsoft.com/dotnet/api/system.single)             | A value that specifies the amount that the curve bends between control points. Values greater than 1 produce unpredictable results.            |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddEllipse(x, y, width, height)

Adds an ellipse to the current path.

| Parameter  | Type                                                          | Description                                                                                   |
| ---------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **x**      | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
| **y**      | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the upper left corner of the bounding rectangle that defines the ellipse. |
| **width**  | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The width of the bounding rectangle that defines the ellipse.                                 |
| **height** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The height of the bounding rectangle that defines the ellipse.                                |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddEllipse(x, y, width, height)

Adds an ellipse to the current path.

| Parameter  | Type                                                        | Description                                                                                   |
| ---------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **x**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
| **y**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the upper left corner of the bounding rectangle that defines the ellipse. |
| **width**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The width of the bounding rectangle that defines the ellipse.                                 |
| **height** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The height of the bounding rectangle that defines the ellipse.                                |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddEllipse(rect)

Adds an ellipse to the current path.

| Parameter | Type                                                                        | Description                                                                                                                                    |
| --------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**  | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) that represents the bounding rectangle that defines the ellipse. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddEllipse(rect)

Adds an ellipse to the current path.

| Parameter | Type                                                                          | Description                                                                                                                                      |
| --------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **rect**  | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) that represents the bounding rectangle that defines the ellipse. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLine(x1, y1, x2, y2)

Appends a line segment to this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                        | Description                                         |
| --------- | ----------------------------------------------------------- | --------------------------------------------------- |
| **x1**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the starting point of the line. |
| **y1**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the starting point of the line. |
| **x2**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The x-coordinate of the endpoint of the line.       |
| **y2**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The y-coordinate of the endpoint of the line.       |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLine(x1, y1, x2, y2)

Appends a line segment to this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                          | Description                                         |
| --------- | ------------------------------------------------------------- | --------------------------------------------------- |
| **x1**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the starting point of the line. |
| **y1**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the starting point of the line. |
| **x2**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the endpoint of the line.       |
| **y2**    | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the endpoint of the line.       |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLine(pt1, pt2)

Appends a line segment to this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                                | Description                                                                                                           |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **pt1**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the starting point of the line. |
| **pt2**   | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the endpoint of the line.       |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLine(pt1, pt2)

Appends a line segment to this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                                  | Description                                                                                                             |
| --------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **pt1**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the starting point of the line. |
| **pt2**   | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the endpoint of the line.       |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLines(points)

Appends a series of connected line segments to the end of this GraphicsPath.

| Parameter  | Type                                                                    | Description                                                                                                                                                 |
| ---------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that represents the points that define the line segments to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddLines(points)

Appends a series of connected line segments to the end of this GraphicsPath.

| Parameter  | Type                                                                      | Description                                                                                                                                                   |
| ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that represents the points that define the line segments to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPath(addingPath, connect)

Appends the specified [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) to this path.

| Parameter      | Type                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                       |
| -------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **addingPath** | [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) | The [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) to add.                                                                                                                                                                                                                                         |
| **connect**    | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                                               | A Boolean value that specifies whether the first figure in the added path is part of the last figure in this path. A value of `true` specifies that (if possible) the first figure in the added path is part of the last figure in this path. A value of `false` specifies that the first figure in the added path is separate from the last figure in this path. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPie(rect, startAngle, sweepAngle)

Adds the outline of a pie shape to this path.

| Parameter      | Type                                                                        | Description                                                                                                                                                                |
| -------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **rect**       | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) that represents the bounding rectangle that defines the ellipse from which the pie is drawn. |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The starting angle for the pie section, measured in degrees clockwise from the x-axis.                                                                                     |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single)               | The angle between *startAngle* and the end of the pie section, measured in degrees clockwise from *startAngle* .                                                           |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPie(x, y, width, height, startAngle, sweepAngle)

Adds the outline of a pie shape to this path.

| Parameter      | Type                                                          | Description                                                                                                               |
| -------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **x**          | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
| **y**          | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
| **width**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The width of the bounding rectangle that defines the ellipse from which the pie is drawn.                                 |
| **height**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)   | The height of the bounding rectangle that defines the ellipse from which the pie is drawn.                                |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The starting angle for the pie section, measured in degrees clockwise from the x-axis.                                    |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The angle between *startAngle* and the end of the pie section, measured in degrees clockwise from *startAngle* .          |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPie(x, y, width, height, startAngle, sweepAngle)

Adds the outline of a pie shape to this path.

| Parameter      | Type                                                          | Description                                                                                                               |
| -------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **x**          | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
| **y**          | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie is drawn. |
| **width**      | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The width of the bounding rectangle that defines the ellipse from which the pie is drawn.                                 |
| **height**     | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The height of the bounding rectangle that defines the ellipse from which the pie is drawn.                                |
| **startAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The starting angle for the pie section, measured in degrees clockwise from the x-axis.                                    |
| **sweepAngle** | [Single](https://docs.microsoft.com/dotnet/api/system.single) | The angle between *startAngle* and the end of the pie section, measured in degrees clockwise from *startAngle* .          |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPolygon(points)

Adds a polygon to this path.

| Parameter  | Type                                                                    | Description                                                                                                                 |
| ---------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **points** | [Point\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.point) | An array of [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) structures that defines the polygon to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddPolygon(points)

Adds a polygon to this path.

| Parameter  | Type                                                                      | Description                                                                                                                   |
| ---------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **points** | [PointF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | An array of [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) structures that defines the polygon to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddRectangle(rect)

Adds a rectangle to this path.

| Parameter | Type                                                                        | Description                                                                                                         |
| --------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **rect**  | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) that represents the rectangle to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddRectangle(rect)

Adds a rectangle to this path.

| Parameter | Type                                                                          | Description                                                                                                           |
| --------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **rect**  | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) that represents the rectangle to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddRectangles(rects)

Adds a series of rectangles to this path.

| Parameter | Type                                                                            | Description                                                                                                                               |
| --------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **rects** | [Rectangle\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) | An array of [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) structures that represents the rectangles to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddRectangles(rects)

Adds a series of rectangles to this path.

| Parameter | Type                                                                              | Description                                                                                                                                 |
| --------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **rects** | [RectangleF\[\]](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) | An array of [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) structures that represents the rectangles to add. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddString(s, family, style, emSize, origin, format)

Adds a text string to this path.

| Parameter  | Type                                                                                      | Description                                                                                                                                                                                                    |
| ---------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **s**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                             | The [String](https://docs.microsoft.com/dotnet/api/system.string) to add.                                                                                                                                      |
| **family** | [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md)     | A [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that represents the name of the font with which the test is drawn.                                                     |
| **style**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                               | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) enumeration that represents style information about the text (bold, italic, and so on). This must be cast as an integer. |
| **emSize** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                             | The height of the em square box that bounds the character.                                                                                                                                                     |
| **origin** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point)                       | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the point where the text starts.                                                                                         |
| **format** | [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) | A [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) that specifies text formatting information, such as line spacing and alignment.                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddString(s, family, style, emSize, origin, format)

Adds a text string to this path.

| Parameter  | Type                                                                                      | Description                                                                                                                                                                                                    |
| ---------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **s**      | [String](https://docs.microsoft.com/dotnet/api/system.string)                             | The [String](https://docs.microsoft.com/dotnet/api/system.string) to add.                                                                                                                                      |
| **family** | [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md)     | A [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that represents the name of the font with which the test is drawn.                                                     |
| **style**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                               | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) enumeration that represents style information about the text (bold, italic, and so on). This must be cast as an integer. |
| **emSize** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                             | The height of the em square box that bounds the character.                                                                                                                                                     |
| **origin** | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf)                     | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the point where the text starts.                                                                                       |
| **format** | [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) | A [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) that specifies text formatting information, such as line spacing and alignment.                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddString(s, family, style, emSize, layoutRect, format)

Adds a text string to this path.

| Parameter      | Type                                                                                      | Description                                                                                                                                                                                                    |
| -------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **s**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                             | The [String](https://docs.microsoft.com/dotnet/api/system.string) to add.                                                                                                                                      |
| **family**     | [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md)     | A [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that represents the name of the font with which the test is drawn.                                                     |
| **style**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                               | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) enumeration that represents style information about the text (bold, italic, and so on). This must be cast as an integer. |
| **emSize**     | [Single](https://docs.microsoft.com/dotnet/api/system.single)                             | The height of the em square box that bounds the character.                                                                                                                                                     |
| **layoutRect** | [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle)               | A [Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle) that represents the rectangle that bounds the text.                                                                              |
| **format**     | [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) | A [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) that specifies text formatting information, such as line spacing and alignment.                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) AddString(s, family, style, emSize, layoutRect, format)

Adds a text string to this path.

| Parameter      | Type                                                                                      | Description                                                                                                                                                                                                    |
| -------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **s**          | [String](https://docs.microsoft.com/dotnet/api/system.string)                             | The [String](https://docs.microsoft.com/dotnet/api/system.string) to add.                                                                                                                                      |
| **family**     | [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md)     | A [FontFamily](/system.drawing.managed/api/system.drawing/system.drawing.fontfamily.md) that represents the name of the font with which the test is drawn.                                                     |
| **style**      | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                               | A [FontStyle](/system.drawing.managed/api/system.drawing/system.drawing.fontstyle.md) enumeration that represents style information about the text (bold, italic, and so on). This must be cast as an integer. |
| **emSize**     | [Single](https://docs.microsoft.com/dotnet/api/system.single)                             | The height of the em square box that bounds the character.                                                                                                                                                     |
| **layoutRect** | [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef)             | A [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef) that represents the rectangle that bounds the text.                                                                            |
| **format**     | [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) | A [StringFormat](/system.drawing.managed/api/system.drawing/system.drawing.stringformat.md) that specifies text formatting information, such as line spacing and alignment.                                    |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) ClearMarkers()

Clears all markers from this path.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Clone()

**Returns:** [Object](https://docs.microsoft.com/dotnet/api/system.object).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) CloseAllFigures()

Closes all open figures in this path and starts a new figure. It closes each open figure by connecting a line from its endpoint to its starting point.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) CloseFigure()

Closes the current figure and starts a new figure. If the current figure contains a sequence of connected lines and curves, the method closes the loop by connecting a line from the endpoint to the starting point.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Dispose()

### ![](/files/k27LziTvwi3FA4zj3c22) Finalize()

Finalizes an instance of the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) class.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Flatten()

Converts each curve in this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) into a sequence of connected line segments.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Flatten(matrix)

Converts each curve in this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) into a sequence of connected line segments.

| Parameter  | Type                                                                                              | Description                                                                                                                                                                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | A [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) by which to transform this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) before flattening. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Flatten(matrix, flatness)

Converts each curve in this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) into a sequence of connected line segments.

| Parameter    | Type                                                                                              | Description                                                                                                                                                                                                                                                     |
| ------------ | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix**   | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | A [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) by which to transform this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) before flattening. |
| **flatness** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                     | Specifies the maximum permitted error between the curve and its flattened approximation. A value of 0.25 is the default. Reducing the flatness value will increase the number of line segments in the approximation.                                            |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetBounds()

Returns a rectangle that bounds this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

**Returns:** [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef). [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetBounds(matrix)

Returns a rectangle that bounds this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter  | Type                                                                                              | Description                                                                                                                                                                                                                                                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | The [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that specifies a transformation to be applied to this path before the bounding rectangle is calculated. This path is not permanently transformed; the transformation is used only during the process of calculating the bounding rectangle. |

**Returns:** [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef). [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetBounds(matrix, pen)

Returns a rectangle that bounds this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter  | Type                                                                                              | Description                                                                                                                                                                                                                                                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | The [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that specifies a transformation to be applied to this path before the bounding rectangle is calculated. This path is not permanently transformed; the transformation is used only during the process of calculating the bounding rectangle. |
| **pen**    | [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md)                           | The [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md) with which to draw the [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).                                                                                                                                 |

**Returns:** [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef). [RectangleF](https://docs.microsoft.com/dotnet/api/system.drawing.rectanglef).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) GetLastPoint()

Gets the last point in the [PathPoints](#pathpoints) array of this GraphicsPath.

**Returns:** [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf). [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) IsVisible(point)

Indicates whether the specified point is contained within this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                                | Description                                                                                              |
| --------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **point** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | A [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) that represents the point to test. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). Returns `true` if the specified point is contained within this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md); otherwise, `false`.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) IsVisible(point)

Indicates whether the specified point is contained within this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter | Type                                                                  | Description                                                                                                |
| --------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **point** | [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) | A [PointF](https://docs.microsoft.com/dotnet/api/system.drawing.pointf) that represents the point to test. |

**Returns:** [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean). Returns `true` if the specified point is contained within this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md); otherwise, `false`.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Reset()

Empties the [PathPoints](#pathpoints) and [PathTypes](#pathtypes) arrays and sets the [FillMode](#fillmode) to [Alternate](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.fillmode.md#fields).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Reverse()

Reverses the order of the points in this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) SetMarkers()

Sets a marker on this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

### ![](/files/gN3G3VR5GgQngV3jdnfJ) StartFigure()

Starts a new figure without closing the current figure. All subsequent points added to the path are added to this new figure.

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Transform(matrix)

Applies a transform matrix to this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md).

| Parameter  | Type                                                                                              | Description                                                                                                                                      |
| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | A [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that represents the transformation to apply. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Widen(pen)

Replaces this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) with curves that enclose the area that is filled when this path is drawn by the specified pen.

| Parameter | Type                                                                    | Description                                                                                                                                                                          |
| --------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **pen**   | [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md) | A [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md) that specifies the width between the original outline of the path and the new outline this method creates. |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Widen(pen, matrix)

Replaces this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) with curves that enclose the area that is filled when this path is drawn by the specified pen.

| Parameter  | Type                                                                                              | Description                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **pen**    | [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md)                           | A [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md) that specifies the width between the original outline of the path and the new outline this method creates. |
| **matrix** | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | A [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that specifies a transform to apply to the path before widening.                 |

### ![](/files/gN3G3VR5GgQngV3jdnfJ) Widen(pen, matrix, flatness)

Replaces this [GraphicsPath](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md) with curves that enclose the area that is filled when this path is drawn by the specified pen.

| Parameter    | Type                                                                                              | Description                                                                                                                                                                          |
| ------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **pen**      | [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md)                           | A [Pen](/system.drawing.managed/api/system.drawing/system.drawing.pen.md) that specifies the width between the original outline of the path and the new outline this method creates. |
| **matrix**   | [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) | A [Matrix](/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.matrix.md) that specifies a transform to apply to the path before widening.                 |
| **flatness** | [Single](https://docs.microsoft.com/dotnet/api/system.single)                                     | A value that specifies the flatness for curves.                                                                                                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing.drawing2d/system.drawing.drawing2d.graphicspath.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
