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

# Polyline

Draws a sequence of lines.

## Declaration

Source position: winapih.inc line 214

`function Polyline(`
`DC: HDC;`
`Points: PPoint;`
`NumPts: Integer`
`):Boolean;`

## Description

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.