unit Polygon;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: Polygon
// Method: Graphics.TCanvas.Polygon
// Routine: Classes.Point

// BeginCode
{
This example draws a polygon in the specified shape, and
fills it with the color teal.
}
procedure TForm1.FormPaint(Sender: TObject);
begin
  Canvas.Brush.Color := clTeal;
  Canvas.Polygon([Point(10, 10), Point(30, 10),
    Point(130, 30), Point(240, 120)]);
end;
// EndCode
// EndExample: Polygon
end.
