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

//需要给 PolyBezierTo 指定起始点 procedure TForm1.FormPaint(Sender: TObject); var ps: array[0..2] of TPoint; begin ps[0].X := 40; ps[0].Y := 110; ps[1].X := 80; ps[1].Y := 30; ps[2].X := 110; ps[2].Y := 70; MoveToEx(Canvas.Handle, 10,70, nil); PolyBezierTo(Canvas.Handle, ps, 3); end;
//效果图:

//PolyBezierTo 会更新当前位置
procedure TForm1.FormPaint(Sender: TObject);
var
  ps: array[0..2] of TPoint;
begin
  ps[0].X := 40;
  ps[0].Y := 110;
  ps[1].X := 80;
  ps[1].Y := 30;
  ps[2].X := 110;
  ps[2].Y := 70;
 
  MoveToEx(Canvas.Handle, 10,70, nil);
  PolyBezierTo(Canvas.Handle, ps, 3);

  {PolyBezierTo 已更新当前位置, 继续画}
  LineTo(Canvas.Handle, 110,10);
  LineTo(Canvas.Handle, 10,10);
  LineTo(Canvas.Handle, 10,70);
end;

//效果图:

posted on 2008-02-09 19:43  万一  阅读(2500)  评论(5编辑  收藏  举报