//聲明:
Polygon(
DC: HDC; {設備環境句柄}
var Points; {點數組}
Count: Integer {數組元素個數}
): BOOL;
//舉例:
procedure TForm1.FormPaint(Sender: TObject);
var
ps: array[0..5] of TPoint;
begin
ps[0].X := 50;
ps[0].Y := 50;
ps[1].X := 100;
ps[1].Y := 50;
ps[2].X := 125;
ps[2].Y := 75;
ps[3].X := 100;
ps[3].Y := 100;
ps[4].X := 50;
ps[4].Y := 100;
ps[5].X := 25;
ps[5].Y := 75;
Polygon(Canvas.Handle, ps, 6);
end;
//效果圖: