---
title: "GdiGraphics..::.DrawPolygon Method (Pen, array&lt;PointF&gt;[]()[])"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawPolygon_2_a58b81e0.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# GdiGraphics.DrawPolygon Method (Pen, PointF[])
 
Draws a polygon.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub DrawPolygon ( _pen As Pen, _points As PointF() _
)
```
 
```csharp
public void DrawPolygon(Pen pen,PointF[] points
)
```
 
### Parameters
 
 - pen
     - Type: [Aurigma.GraphicsMill.Drawing.Pen](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_Pen.htm.md)
 [Pen](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_Pen.htm.md) object which is used to outline a polygon.

 - points
     - Type:  [System.Drawing.PointF](http://msdn2.microsoft.com/en-us/ckys1c1e) []
Array of coordinates of the polygon vertices.
 
## Remarks
 Polyline can be treated as closed polyline, where last point is connected with the first one. 
All the coordinates are measured in units specified with [Unit](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_UnitConverterObject_Unit.htm.md) property.

To fill the polygon, use [FillPolygon(Brush, PointF\[\], FillMode)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_FillPolygon_3_d47264d2.htm.md) method.
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [DrawPolygon Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawPolygon.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
