//聲明:
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;
//效果圖: