---
title: "Graphics.DrawPath Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_DrawPath_2_77634c23.htm
product: "Graphics Mill"
---

# Graphics.DrawPath Method 
 
Draws a path defined by a [Path](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md) instance.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void DrawPath(Pen pen,Path path
)
```
 
### Parameters
 
 - pen
     - Type: [Aurigma.GraphicsMill.Drawing.Pen](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Pen.htm.md)
A [Pen](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Pen.htm.md) that determines the color, width, and style of the path.

 - path
     - Type: [Aurigma.GraphicsMill.Drawing.Path](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md)
A [Path](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Path.htm.md) to draw.
 
## Remarks
  
A path is a set of geometric elements (curves, text, and graphics shapes) that can be used as a single object. Paths can be used different operations: drawing outlined or filled path, drawing a text string along a path, and cropping an image.
 
To fill the path, use [FillPath(Brush, Path)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_FillPath_2_3cee1596.htm.md) method.
 
## Examples
  
```csharp
using (var bitmap = new Bitmap(170, 160, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetGraphics())
using (var path = new Path())
{
    path.DrawRectangle(new System.Drawing.RectangleF(75, 75, 75, 35));
    graphics.DrawPath(new Pen(RgbColor.Green), path);
    bitmap.Save(@"Images\Output\out.png");
}
```
   
## See Also

### Reference

- [Graphics Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)
- [Graphics.FillPath(Brush, Path)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_FillPath_2_3cee1596.htm.md)

### Manual

- [Graphics: Drawing Images and Geometric Shapes](https://www.graphicsmill.com/docs/gm/graphics.htm.md)
- [Working with Paths](https://www.graphicsmill.com/docs/gm/working-with-path.htm.md)
