---
title: "Graphics.DrawLine Method (Pen, PointF, PointF)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Drawing_Graphics_DrawLine_3_32eccb21.htm
product: "Graphics Mill"
---

# Graphics.DrawLine Method (Pen, PointF, PointF)
 
Draws a line connecting two points defined by PointF structures.
 
**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 DrawLine(Pen pen,PointF pt1,PointF pt2
)
```
 
### 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 line.

 - pt1
     - Type: System.Drawing.PointF
A PointF structure that represents the first point to connect.

 - pt2
     - Type: System.Drawing.PointF
A PointF structure that represents the second point to connect.
 
## Remarks
  
In this method line is defined with two points which should be connected with this line.
   
## See Also

### Reference

- [Graphics Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Drawing_Graphics.htm.md)
- [DrawLine Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_Drawing_Graphics_DrawLine.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Drawing.htm.md)

### Manual

- [Graphics: Drawing Images and Geometric Shapes](https://www.graphicsmill.com/docs/gm/graphics.htm.md)
