unit Polyline;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls;

type
  TForm1 = class(TForm)
    PaintBox1: TPaintBox;
    procedure PaintBox1Paint(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: Polyline
// Event: ExtCtrls.TPaintBox.OnPaint
// Property: Graphics.TCanvas.Pen
// Method: Graphics.TCanvas.Polyline

// BeginCode
{
This example paints a white five-pointed star in a paintbox 
control:
} 
procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
  with Sender as TPaintBox do
  begin
    Canvas.Pen.Color := clWhite;
    Canvas.Polyline([Point(40, 10), Point(20, 60), Point(70, 30),
    Point(10, 30), Point(60, 60), Point(40, 10)]);
  end;
end;
// EndCode
// EndExample: Polyline
end.
