---
title: "GdiGraphics..::.DrawLines Method (Pen, array&lt;Point&gt;[]()[])"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawLines_2_9dc896e0.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.DrawLines Method (Pen, Point[])
 
Draws a polyline.
 
**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 DrawLines ( _pen As Pen, _points As Point() _
)
```
 
```csharp
public void DrawLines(Pen pen,Point[] 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 draw a polyline.

 - points
     - Type:  [System.Drawing.Point](http://msdn2.microsoft.com/en-us/bk9hwzbw) []
Array of coordinates of the polyline vertices.
 
## Remarks
 Polyline is a set of connected lines (end point of some polyline segment is a start point of the next segment). It is defined with an array of points which should be connected with this polyline (polyline vertices). 
All the coordinates are measured in units specified with [Unit](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_UnitConverterObject_Unit.htm.md) property.
 
## Examples
  
```
Dim bitmap As New Aurigma.GraphicsMill.Bitmap( _
 Aurigma.GraphicsMill.RgbColor.White, 185, 145, _
 Aurigma.GraphicsMill.PixelFormat.Format24bppRgb)

Dim graphics As Aurigma.GraphicsMill.Drawing.GdiGraphics = bitmap.GetGdiGraphics()

'Draw line
Dim pen As New Aurigma.GraphicsMill.Drawing.Pen(Aurigma.GraphicsMill.RgbColor.Red, 5)
graphics.DrawLine(pen, 10, 10, 100, 60)

'Draw polyline
pen.Color = Aurigma.GraphicsMill.RgbColor.FromArgb(150, 0, 255, 0)
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash
pen.Width = 2
Dim points1 As System.Drawing.Point() = { _
 New System.Drawing.Point(20, 30), New System.Drawing.Point(50, 2), _
 New System.Drawing.Point(180, 30), New System.Drawing.Point(80, 140)}
graphics.DrawLines(pen, points1)

'Draw beizer
pen.Color = Aurigma.GraphicsMill.RgbColor.Blue
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid
Dim points2 As System.Drawing.Point() = { _
 New System.Drawing.Point(5, 5), New System.Drawing.Point(20, 150), _
 New System.Drawing.Point(165, 80), New System.Drawing.Point(175, 10)}
graphics.DrawBeziers(pen, points2)
```
 
```csharp
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(
    Aurigma.GraphicsMill.RgbColor.White, 185, 145, 
    Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);

Aurigma.GraphicsMill.Drawing.GdiGraphics graphics = bitmap.GetGdiGraphics();

//Draw line
Aurigma.GraphicsMill.Drawing.Pen pen = new Aurigma.GraphicsMill.Drawing.Pen(
    Aurigma.GraphicsMill.RgbColor.Red, 5);
graphics.DrawLine(pen, 10, 10, 100, 60);

//Draw polyline
pen.Color = Aurigma.GraphicsMill.RgbColor.FromArgb(150, 0, 255, 0);
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
pen.Width = 2;
System.Drawing.Point[] points1 = { 
    new System.Drawing.Point(20, 30), new System.Drawing.Point(50, 2), 
    new System.Drawing.Point(180, 30), new System.Drawing.Point(80, 140)};
graphics.DrawLines(pen, points1);

//Draw beizer
pen.Color = Aurigma.GraphicsMill.RgbColor.Blue;
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
System.Drawing.Point[] points2 = { 
    new System.Drawing.Point(5, 5), new System.Drawing.Point(20, 150), 
    new System.Drawing.Point(165, 80), new System.Drawing.Point(175, 10)};
graphics.DrawBeziers(pen, points2);
```
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [DrawLines Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Drawing_GdiGraphics_DrawLines.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
