游子日月长

笑渐不闻声渐悄,多情却被无情恼!

导航

画多边型

procedure TForm1.Button1Click(Sender: TObject);
var
  ptArray : array[0..9] of TPOINT;
  PtCounts : array[0..1] of integer;
begin
  PtArray[0] := Point(0,   0);
  PtArray[1] := Point(0,  100);
  PtArray[2] := Point(100, 100);
  PtArray[3] := Point(100,  0);
  PtArray[4] := Point(0,   0);
  PtCounts[0] := 5;
  PtArray[5] := Point(25, 25);
  PtArray[6] := Point(25, 75);
  PtArray[7] := Point(75, 75);
  PtArray[8] := Point(75, 25);
  PtArray[9] := Point(25, 25);
  PtCounts[1] := 5;
  PolyPolygon(Form1.Canvas.Handle,
                      PtArray,
                      PtCounts,
                      2);
end;

posted on 2017-02-07 14:56  游子日月长  阅读(96)  评论(0编辑  收藏  举报