[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TCanvas.Polyline

Polyline connects a set of points on the canvas

## Declaration

Source position: line 0

`public procedure TCanvas.Polyline(`
`const Points: array of TPoint;`
`StartIndex: Integer;`
`NumPts: Integer = -1`
`); procedure TCanvas.Polyline(`
`Points: PPoint;`
`NumPts: Integer`
`); virtual; procedure TCanvas.Polyline(`
`const Points: array of TPoint`
`);`

## Description

Method: TCanvas.Polyline
Params: Points: array of TPoint; StartIndex: Integer = 0; NumPts: Integer = -1
Returns: Nothing
Use Polyline to connect a set of points on the Canvas . If you specify only two points, Polyline draws a single line.
The Points parameter is an array of points to be connected.
StartIndex identifies the first point in the array to use.
NumPts indicates the number of points to use. If NumPts is -1 (the default), PolyLine uses all the points from StartIndex to the end of the array.
Calling the MoveTo function with the value of the first point, and then repeatedly calling LineTo with all subsequent points will draw the same image on the canvas. However, unlike LineTo , Polyline does not change the value of PenPos .

## See also

TCanvas.MoveTo
TCanvas.LineTo

The latest version of this document can be found at lazarus-ccr.sourceforge.net.