Sign in Join
FPDoc Onlineexperiment

TCanvas.Polyline procedure

Member of TCanvaspublicIn unit Graphics

Draws a line which connects a set of points on the canvas.

Declaration

pascal
procedure Polyline(const Points: Array of TPoint; StartIndex: Integer; 
 NumPts: Integer=- 1)
procedure Polyline(Points: PPoint; NumPts: Integer); virtual
procedure Polyline(const Points: Array of TPoint); reintroduce

Arguments

Points

Array of or pointer to the TPoint instances for the line.

StartIndex

Position of the first point used when drawing the line.

NumPts

Number of points available in the pointer.

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 values in PenPos.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.