随笔 - 2146  文章 - 97 评论 - 11767 trackbacks - 253

//声明:
Polyline(
  DC: HDC;       {设备环境句柄}
  var Points;    {点数组}
  Count: Integer {数组元素个数}
): BOOL;

{Polyline 与 Polygon 的参数一模一样, 但 Polygon 能自动闭合}

//绘制连续直线 Polyline 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; Polyline(Canvas.Handle, ps, 6); end;
//效果图:

posted on 2008-02-09 20:08  万一  阅读(...)  评论(...编辑  收藏